51 lines
1.1 KiB
YAML
51 lines
1.1 KiB
YAML
services:
|
|
family-wishlist-backend:
|
|
build:
|
|
context: .
|
|
dockerfile: docker/backend.Dockerfile
|
|
container_name: family-wishlist-backend
|
|
restart: unless-stopped
|
|
env_file: .env
|
|
environment:
|
|
NODE_ENV: production
|
|
UPLOADS_DIR: /app/apps/backend/uploads
|
|
BACKEND_PORT: 3000
|
|
DATABASE_URL: postgresql://${DB_USER}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME}
|
|
volumes:
|
|
- uploads:/app/apps/backend/uploads
|
|
healthcheck:
|
|
test:
|
|
[
|
|
"CMD",
|
|
"wget",
|
|
"-qO-",
|
|
"http://127.0.0.1:3000/api/health",
|
|
]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 20s
|
|
networks:
|
|
- postgres_default
|
|
|
|
frontend:
|
|
build:
|
|
context: .
|
|
dockerfile: docker/frontend.Dockerfile
|
|
container_name: family-wishlist-frontend
|
|
restart: unless-stopped
|
|
depends_on:
|
|
family-wishlist-backend:
|
|
condition: service_healthy
|
|
ports:
|
|
- "3055:80"
|
|
networks:
|
|
- postgres_default
|
|
|
|
volumes:
|
|
uploads:
|
|
|
|
networks:
|
|
postgres_default:
|
|
external: true
|