- docker-compose.yml: restart always, env_file, named volume, start_period - frontend/nginx.conf: gzip compression, cache headers for assets, no-cache for SW - Makefile: add prod-down and prod-logs targets - docs/DEPLOY.md: Dokploy + Cloudflare Tunnel deploy instructions Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
34 lines
695 B
YAML
34 lines
695 B
YAML
services:
|
|
backend:
|
|
build: ./backend
|
|
restart: always
|
|
env_file: .env
|
|
volumes:
|
|
- backend-data:/app/data
|
|
environment:
|
|
- DATABASE_URL=sqlite+aiosqlite:///./data/roaauto.db
|
|
- CORS_ORIGINS=https://roaauto.romfast.ro
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "curl -f http://localhost:8000/api/health || exit 1"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 15s
|
|
|
|
frontend:
|
|
build: ./frontend
|
|
restart: always
|
|
ports:
|
|
- "80:80"
|
|
depends_on:
|
|
backend:
|
|
condition: service_healthy
|
|
|
|
volumes:
|
|
backend-data:
|
|
driver: local
|
|
driver_opts:
|
|
type: none
|
|
o: bind
|
|
device: ./backend/data
|