feat: migrate stack to Portainer git-managed, rename project to valhalla-lab

- Rename project from htpc-download-box to valhalla-lab (directory + dc alias)
- Remove portainer and watchtower from compose; run standalone outside managed stack
  to prevent self-termination during Portainer-triggered redeployments
- Add portainer_proxy external network shared by caddy and standalone portainer
  so Caddy can route to Portainer via Docker DNS without them being in the same stack
- Carve out POST /api/stacks/webhooks/* in Caddyfile so Portainer webhooks can
  reach through the internal_only guard without exposing the full UI
- Update apply-compose.ps1 and sync-prod.ps1 paths from htpc-download-box to valhalla-lab
This commit is contained in:
ginnoir
2026-06-03 23:09:53 -05:00
parent 8558872362
commit bb46b1c10e
4 changed files with 21 additions and 30 deletions
+13 -2
View File
@@ -185,8 +185,19 @@ dev.ginnoir.com {
# MANAGEMENT — internal only
# =============================================================
portainer.ginnoir.com {
import internal_only
reverse_proxy portainer:9000
@webhook {
method POST
path /api/stacks/webhooks/*
}
handle @webhook {
reverse_proxy portainer:9000
}
handle {
import internal_only
reverse_proxy portainer:9000
}
}
uptime.ginnoir.com {
+3 -3
View File
@@ -2,7 +2,7 @@
# to the live Docker stack.
#
# On valhalla, `dc` is aliased (in ~/.bashrc) to:
# docker-compose -f ~/htpc-download-box/docker-compose.yml --env-file ~/htpc-download-box/.env
# docker compose -f ~/valhalla-lab/docker-compose.yml --env-file ~/valhalla-lab/.env
# It's a shell alias, so we invoke it over SSH with `bash -ic` to load it.
#
# Usage (flags combine; no flags = push & apply all three):
@@ -33,7 +33,7 @@ if (-not $Compose -and -not $Caddy -and -not $EnvFile) {
if ($EnvFile) {
Write-Host "Pushing .env ..."
scp $envLocal "${server}:~/htpc-download-box/.env"
scp $envLocal "${server}:~/valhalla-lab/.env"
}
if ($Caddy) {
@@ -45,7 +45,7 @@ if ($Caddy) {
if ($Compose) {
Write-Host "Pushing docker-compose.yml ..."
scp $composeLocal "${server}:~/htpc-download-box/docker-compose.yml"
scp $composeLocal "${server}:~/valhalla-lab/docker-compose.yml"
Write-Host "Pulling latest images ..."
ssh $server "bash -ic 'dc pull'"
Write-Host "Applying compose changes (recreates only changed containers) ..."
+3 -23
View File
@@ -76,6 +76,7 @@ services:
- famapp
- authentik
- management
- portainer_proxy
ports:
- "80:80"
- "443:443"
@@ -566,18 +567,6 @@ services:
# ============================================================
# MANAGEMENT
# ============================================================
portainer:
container_name: portainer
image: portainer/portainer-ce:latest
restart: unless-stopped
networks:
- management
ports:
- "9100:9000"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /config/portainer:/data
uptime-kuma:
container_name: uptime_kuma
image: louislam/uptime-kuma:2
@@ -618,17 +607,6 @@ services:
ports:
- "9009:80"
watchtower:
container_name: watchtower
image: containrrr/watchtower:latest
restart: unless-stopped
environment:
- WATCHTOWER_NOTIFICATION_SKIP_TITLE=true
- WATCHTOWER_NOTIFICATION_URL=ntfy://ntfy.ginnoir.com/watchtower?title=WatchtowerUpdates
- DOCKER_API_VERSION=1.40
volumes:
- /var/run/docker.sock:/var/run/docker.sock
# ============================================================
# FAMAPP
# ============================================================
@@ -801,6 +779,8 @@ networks:
famapp:
authentik:
management:
portainer_proxy:
external: true
volumes:
minio_data:
+2 -2
View File
@@ -15,8 +15,8 @@ $repoDir = $PSScriptRoot
Write-Host "Syncing production configs from $server ..."
scp "${server}:~/htpc-download-box/docker-compose.yml" "$repoDir\docker-compose.yml"
scp "${server}:~/htpc-download-box/.env" "$repoDir\.env"
scp "${server}:~/valhalla-lab/docker-compose.yml" "$repoDir\docker-compose.yml"
scp "${server}:~/valhalla-lab/.env" "$repoDir\.env"
scp "${server}:/config/caddy/Caddyfile" "$repoDir\Caddyfile"
Write-Host "Done. Files synced:"