feat(FN-002): complete Step 5 — Docker Compose and Portainer/Traefik Skeleton

This commit is contained in:
Fusion
2026-05-14 01:58:18 +02:00
parent 2e8a558b71
commit 7b45344237
8 changed files with 215 additions and 0 deletions
+50
View File
@@ -0,0 +1,50 @@
services:
api:
build:
context: ./apps/api
dockerfile: Dockerfile
ports:
- "8000:8000"
env_file:
- .env
environment:
- DATABASE_URL=postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:5432/${POSTGRES_DB:-headquarter}
depends_on:
db:
condition: service_healthy
volumes:
- api-data:/data
restart: unless-stopped
web:
build:
context: ./apps/web
dockerfile: Dockerfile
ports:
- "5173:80"
env_file:
- .env
depends_on:
- api
restart: unless-stopped
db:
image: postgres:17-alpine
environment:
- POSTGRES_USER=${POSTGRES_USER:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres}
- POSTGRES_DB=${POSTGRES_DB:-headquarter}
volumes:
- postgres-data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres} -d ${POSTGRES_DB:-headquarter}"]
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
volumes:
postgres-data:
api-data: