mirror of
https://github.com/mblanke/Lottery-Tracker.git
synced 2026-03-01 06:00:21 -05:00
49 lines
1.0 KiB
YAML
49 lines
1.0 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
# Flask Backend
|
|
backend:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.backend
|
|
container_name: lottery-backend
|
|
ports:
|
|
- "5000:5000"
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
- FLASK_ENV=production
|
|
- FLASK_DEBUG=false
|
|
- PYTHONUNBUFFERED=1
|
|
restart: unless-stopped
|
|
networks:
|
|
- lottery-network
|
|
healthcheck:
|
|
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('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
|
|
|
|
networks:
|
|
lottery-network:
|
|
driver: bridge
|