services:
app:
build: .
container_name: lumina_app
ports:
- "8000:8000"
environment:
- DATABASE_URL=postgres://lumina:secret@db:5432/lumina
- REDIS_URL=redis://redis:6379
- APP_ENV=production
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
volumes:
- ./storage:/app/storage
restart: unless-stopped
db:
image: postgres:15-alpine
container_name: lumina_db
environment:
- POSTGRES_USER=lumina
- POSTGRES_PASSWORD=secret
- POSTGRES_DB=lumina
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U lumina"]
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
container_name: lumina_redis
ports:
- "6379:6379"
nginx:
image: nginx:alpine
container_name: lumina_nginx
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./storage/app/public:/app/public:ro
depends_on:
- app
volumes:
postgres_data: