feat(deploy): docker-compose production stack with bootstrap envs

This commit is contained in:
2026-04-29 10:47:00 +08:00
parent fb116de7c8
commit 3fd6bd82e3
+39
View File
@@ -0,0 +1,39 @@
services:
postgres:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-acw}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-acw}
POSTGRES_DB: ${POSTGRES_DB:-acw}
volumes:
- acw-pg-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-acw}"]
interval: 5s
timeout: 5s
retries: 10
app:
image: acw:dev
build: .
restart: unless-stopped
environment:
APP_ENV: production
APP_HTTP_ADDR: ":8080"
APP_DB_DSN: "postgres://${POSTGRES_USER:-acw}:${POSTGRES_PASSWORD:-acw}@postgres:5432/${POSTGRES_DB:-acw}?sslmode=disable"
APP_MASTER_KEY: "${APP_MASTER_KEY}"
APP_DATA_DIR: "/data"
APP_BOOTSTRAP_ADMIN_EMAIL: "${APP_BOOTSTRAP_ADMIN_EMAIL:-admin@local}"
APP_BOOTSTRAP_ADMIN_PASSWORD: "${APP_BOOTSTRAP_ADMIN_PASSWORD}"
ports:
- "8080:8080"
volumes:
- acw-data:/data
depends_on:
postgres:
condition: service_healthy
volumes:
acw-pg-data:
acw-data: