Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 768d1b23d4 | |||
| 11f0f79866 |
+4
-3
@@ -30,9 +30,10 @@ S3_REGION=us-east-1
|
|||||||
# tunnel forwards plain HTTP to caddy:80.
|
# tunnel forwards plain HTTP to caddy:80.
|
||||||
PROVENANCE_SITE_ADDRESS=:80
|
PROVENANCE_SITE_ADDRESS=:80
|
||||||
|
|
||||||
# --- Cloudflare Tunnel (optional) ---
|
# --- Deploy-host services (optional, selected via COMPOSE_PROFILES) ---
|
||||||
# Enable by setting COMPOSE_PROFILES=tunnel and supplying the connector token
|
# 'tunnel' -> cloudflared connector (needs CLOUDFLARE_TUNNEL_TOKEN; public hostname -> http://caddy:80)
|
||||||
# from the Cloudflare dashboard. Public hostname -> http://caddy:80.
|
# 'watchtower' -> auto-pull updated backend/frontend images every 2 min (needs `docker login git.jpaul.io` on the host)
|
||||||
|
# Combine with commas. On the lab host: COMPOSE_PROFILES=tunnel,watchtower
|
||||||
CLOUDFLARE_TUNNEL_TOKEN=
|
CLOUDFLARE_TUNNEL_TOKEN=
|
||||||
COMPOSE_PROFILES=
|
COMPOSE_PROFILES=
|
||||||
|
|
||||||
|
|||||||
@@ -42,6 +42,8 @@ services:
|
|||||||
|
|
||||||
backend:
|
backend:
|
||||||
image: git.jpaul.io/justin/provenance-backend:${IMAGE_TAG:-test-main}
|
image: git.jpaul.io/justin/provenance-backend:${IMAGE_TAG:-test-main}
|
||||||
|
labels:
|
||||||
|
com.centurylinklabs.watchtower.enable: "true"
|
||||||
environment:
|
environment:
|
||||||
APP_ENV: ${APP_ENV:-development}
|
APP_ENV: ${APP_ENV:-development}
|
||||||
DATABASE_URL: ${DATABASE_URL:-postgresql+asyncpg://provenance:provenance@postgres:5432/provenance}
|
DATABASE_URL: ${DATABASE_URL:-postgresql+asyncpg://provenance:provenance@postgres:5432/provenance}
|
||||||
@@ -62,6 +64,8 @@ services:
|
|||||||
|
|
||||||
frontend:
|
frontend:
|
||||||
image: git.jpaul.io/justin/provenance-frontend:${IMAGE_TAG:-test-main}
|
image: git.jpaul.io/justin/provenance-frontend:${IMAGE_TAG:-test-main}
|
||||||
|
labels:
|
||||||
|
com.centurylinklabs.watchtower.enable: "true"
|
||||||
environment:
|
environment:
|
||||||
NODE_ENV: production
|
NODE_ENV: production
|
||||||
depends_on:
|
depends_on:
|
||||||
@@ -104,6 +108,21 @@ services:
|
|||||||
profiles:
|
profiles:
|
||||||
- tunnel
|
- tunnel
|
||||||
|
|
||||||
|
# Auto-deploy: watch the label-enabled app containers (backend, frontend),
|
||||||
|
# poll the registry every 2 minutes, and recreate on a new :test-main digest.
|
||||||
|
# Scoped by label so it never touches Postgres/MinIO/Caddy. Registry creds come
|
||||||
|
# from the host docker config (the `docker login git.jpaul.io` on the host).
|
||||||
|
# Opt-in via the "watchtower" profile.
|
||||||
|
watchtower:
|
||||||
|
image: containrrr/watchtower:latest
|
||||||
|
restart: unless-stopped
|
||||||
|
command: --label-enable --cleanup --interval 120
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
- ${HOME:-/root}/.docker/config.json:/config.json:ro
|
||||||
|
profiles:
|
||||||
|
- watchtower
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
pgdata:
|
pgdata:
|
||||||
miniodata:
|
miniodata:
|
||||||
|
|||||||
Reference in New Issue
Block a user