updated sample compose file to reflect zero downtime deployment on the actual compose file

This commit is contained in:
venus
2026-09-15 00:33:58 -05:00
parent d6c5ed1d3b
commit 2bf5e83964
+23 -18
View File
@@ -1,25 +1,30 @@
services:
web:
build:
context: .
dockerfile: Dockerfile
args:
SITE_DOMAIN: "${SITE_DOMAIN:?Error: SITE_DOMAIN is not set. Please define SITE_DOMAIN in .env}"
SITE_URL: "${SITE_URL:-https://${SITE_DOMAIN}}"
PORT: "${PORT:-8080}"
image: river-rooks-blog:latest
container_name: river_rooks_web
x-blog-templage: &blog-base
image: git.riverrooks.dev/venus/river-rooks-blog:latest
restart: unless-stopped
healthcheck:
test: ["CMD", "node", "test/healthcheck.js"]
interval: 30s
timeout: 3s
start_period: 3s
retries: 3
volumes:
- "./posts:/app/src/posts"
environment:
- "SITE_DOMAIN=${SITE_DOMAIN:?Error: SITE_DOMAIN is not set. Please define SITE_DOMAIN in .env}"
- "SITE_URL=${SITE_URL:-https://${SITE_DOMAIN}}"
- "PORT=${PORT:-8080}"
- "WATCH=true"
- "API_SECRET=${API_SECRET}"
ports:
- "${HOST_PORT:-${PORT:-8080}}:${PORT:-8080}"
networks:
- backend
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:${PORT:-8080}/healthz > /dev/null || exit 1"]
interval: 5s
timeout: 3s
retries: 3
start_period: 5s
# I Have this deployed with a series of traefik labels but that's not strictly nessescary
services:
blog-blue:
<<: *blog-base
blog-green:
<<: *blog-base
networks:
backend:
external: true