- Add COMPOSE_PROJECT_NAME for unique container names - Add BACKEND_PORT for configurable port mapping - Update deploy.sh to export variables for docker compose - Update health checks to use configured port Allows running prod and dev instances simultaneously by cloning the repo twice with different .env.deploy configurations. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
19 lines
416 B
YAML
19 lines
416 B
YAML
services:
|
|
backend:
|
|
build:
|
|
context: .
|
|
dockerfile: backend/Dockerfile
|
|
ports:
|
|
- "${BACKEND_PORT:-8000}:8000"
|
|
env_file:
|
|
- backend/.env
|
|
environment:
|
|
- HOST=0.0.0.0
|
|
- PORT=8000
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 10s
|
|
restart: unless-stopped
|