48 lines
1.2 KiB
YAML
48 lines
1.2 KiB
YAML
# Production compose for Yandex Cloud VM (or Selectel cloud server).
|
|
# Pull pre-built images from Yandex Container Registry pushed by GitHub Actions.
|
|
#
|
|
# Place this file at /opt/gendesign/docker-compose.prod.yml on the VM.
|
|
# Required env vars provided via /opt/gendesign/.env:
|
|
# YC_REGISTRY_ID, IMAGE_TAG, DATABASE_URL, REDIS_URL, SENTRY_DSN,
|
|
# NEXT_PUBLIC_API_BASE_URL
|
|
|
|
services:
|
|
backend:
|
|
image: cr.yandex/${YC_REGISTRY_ID}/backend:${IMAGE_TAG:-latest}
|
|
restart: unless-stopped
|
|
env_file: .env
|
|
ports:
|
|
- "127.0.0.1:8000:8000"
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
frontend:
|
|
image: cr.yandex/${YC_REGISTRY_ID}/frontend:${IMAGE_TAG:-latest}
|
|
restart: unless-stopped
|
|
environment:
|
|
NEXT_PUBLIC_API_BASE_URL: ${NEXT_PUBLIC_API_BASE_URL}
|
|
ports:
|
|
- "127.0.0.1:3000:3000"
|
|
depends_on:
|
|
- backend
|
|
|
|
caddy:
|
|
image: caddy:2
|
|
restart: unless-stopped
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
volumes:
|
|
- ./Caddyfile:/etc/caddy/Caddyfile:ro
|
|
- caddy_data:/data
|
|
- caddy_config:/config
|
|
depends_on:
|
|
- backend
|
|
- frontend
|
|
|
|
volumes:
|
|
caddy_data:
|
|
caddy_config:
|