mirror of
https://github.com/mblanke/Lottery-Tracker.git
synced 2026-03-01 14:10:22 -05:00
60 lines
1.3 KiB
YAML
60 lines
1.3 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
# Flask Backend
|
|
backend:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.backend
|
|
container_name: lottery-backend
|
|
ports:
|
|
- "5000:5000"
|
|
environment:
|
|
- FLASK_ENV=production
|
|
- PYTHONUNBUFFERED=1
|
|
restart: unless-stopped
|
|
networks:
|
|
- lottery-network
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:5000/api/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
|
|
# Next.js Frontend
|
|
frontend:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.frontend
|
|
args:
|
|
NEXT_PUBLIC_API_URL: http://localhost:5000
|
|
container_name: lottery-frontend
|
|
ports:
|
|
- "3003:3000"
|
|
environment:
|
|
- NEXT_PUBLIC_API_URL=http://localhost:5000
|
|
depends_on:
|
|
- backend
|
|
restart: unless-stopped
|
|
networks:
|
|
- lottery-network
|
|
|
|
# Email Scheduler (Optional - runs daily at 7 AM)
|
|
email-scheduler:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.email
|
|
container_name: lottery-email
|
|
environment:
|
|
- PYTHONUNBUFFERED=1
|
|
restart: unless-stopped
|
|
networks:
|
|
- lottery-network
|
|
profiles:
|
|
- email # Only start if explicitly requested
|
|
|
|
networks:
|
|
lottery-network:
|
|
driver: bridge
|