Files
2026FIFAWorldCup/docker-compose.yml

95 lines
2.1 KiB
YAML

version: '3.8'
services:
fifa2026-postgres:
image: timescale/timescaledb:latest-pg16
environment:
POSTGRES_USER: fifa_user
POSTGRES_PASSWORD: change_me
POSTGRES_DB: fifa2026
ports:
- "5432:5432"
volumes:
- pg-data:/var/lib/postgresql/data
- ./platform/backend/db_init_timescaledb.sql:/docker-entrypoint-initdb.d/init.sql
networks:
- wc2026-net
healthcheck:
test: ["CMD-SHELL", "pg_isready -U fifa_user -d fifa2026"]
interval: 10s
timeout: 5s
retries: 5
fifa2026-redis:
image: redis:7-alpine
command: redis-server --appendonly yes
ports:
- "6379:6379"
volumes:
- redis-data:/data
networks:
- wc2026-net
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
fifa2026-backend:
build:
context: ./platform/backend
ports:
- "8000:8000"
volumes:
- ./platform/backend:/app
environment:
- DATABASE_URL=postgresql+asyncpg://fifa_user:change_me@fifa2026-postgres:5432/fifa2026
- REDIS_URL=redis://fifa2026-redis:6379/0
- THE_ODDS_API_KEY=${THE_ODDS_API_KEY:-}
depends_on:
fifa2026-postgres:
condition: service_healthy
fifa2026-redis:
condition: service_healthy
networks:
- wc2026-net
fifa2026-web:
build:
context: ./platform/web
ports:
- "3000:3000"
volumes:
- ./platform/web:/app
- /app/node_modules
- /app/.next
environment:
- NEXT_PUBLIC_API_URL=http://localhost:8000
depends_on:
- fifa2026-backend
networks:
- wc2026-net
fifa2026-alerts:
build:
context: ./platform/alerts
volumes:
- ./platform/alerts:/app
environment:
- REDIS_URL=redis://fifa2026-redis:6379/0
- TELEGRAM_BOT_TOKEN=${TELEGRAM_BOT_TOKEN:-}
- TELEGRAM_CHAT_ID=${TELEGRAM_CHAT_ID:-}
depends_on:
fifa2026-redis:
condition: service_healthy
networks:
- wc2026-net
networks:
wc2026-net:
driver: bridge
volumes:
pg-data:
redis-data: