mirror of
https://github.com/mblanke/Lottery-Tracker.git
synced 2026-03-01 06:00:21 -05:00
Initial commit with dev backbone template
This commit is contained in:
59
docker-compose.yml
Normal file
59
docker-compose.yml
Normal file
@@ -0,0 +1,59 @@
|
||||
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
|
||||
Reference in New Issue
Block a user