Version 1.1

This commit is contained in:
2026-02-18 08:24:54 -05:00
parent 4318c8f642
commit fdba869a8d
33 changed files with 2142 additions and 1942 deletions

View File

@@ -1,5 +1,3 @@
version: '3.8'
services:
# Nginx Reverse Proxy
nginx:
@@ -26,14 +24,17 @@ services:
container_name: lottery-backend
expose:
- "5000"
env_file:
- .env
environment:
- FLASK_ENV=production
- FLASK_DEBUG=false
- PYTHONUNBUFFERED=1
restart: always
networks:
- lottery-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5000/api/health"]
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:5000/api/health')"]
interval: 30s
timeout: 10s
retries: 3
@@ -41,10 +42,10 @@ services:
deploy:
resources:
limits:
cpus: '1'
cpus: "1"
memory: 2G
reservations:
cpus: '0.5'
cpus: "0.5"
memory: 1G
# Next.js Frontend
@@ -52,11 +53,13 @@ services:
build:
context: .
dockerfile: Dockerfile.frontend
args:
NEXT_PUBLIC_API_URL: /api
container_name: lottery-frontend
expose:
- "3000"
environment:
- NEXT_PUBLIC_API_URL=http://backend:5000
- NEXT_PUBLIC_API_URL=/api
- NODE_ENV=production
depends_on:
- backend
@@ -66,29 +69,12 @@ services:
deploy:
resources:
limits:
cpus: '0.5'
cpus: "0.5"
memory: 512M
reservations:
cpus: '0.25'
cpus: "0.25"
memory: 256M
# Email Scheduler
email-scheduler:
build:
context: .
dockerfile: Dockerfile.email
container_name: lottery-email
environment:
- PYTHONUNBUFFERED=1
restart: always
networks:
- lottery-network
deploy:
resources:
limits:
cpus: '0.5'
memory: 1G
networks:
lottery-network:
driver: bridge