98 lines
2.3 KiB
YAML
98 lines
2.3 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
fifa2026-postgres:
|
|
image: timescale/timescaledb:latest-pg16
|
|
restart: always
|
|
environment:
|
|
POSTGRES_USER: fifa_user
|
|
POSTGRES_PASSWORD: ${DB_PASSWORD:-change_me}
|
|
POSTGRES_DB: fifa2026
|
|
ports:
|
|
- "127.0.0.1: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
|
|
restart: always
|
|
command: redis-server --appendonly yes
|
|
ports:
|
|
- "127.0.0.1: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
|
|
restart: always
|
|
ports:
|
|
- "127.0.0.1:8000:8000"
|
|
environment:
|
|
- DATABASE_URL=postgresql+asyncpg://fifa_user:${DB_PASSWORD:-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
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
|
|
fifa2026-web:
|
|
build:
|
|
context: ./platform/web
|
|
restart: always
|
|
ports:
|
|
- "127.0.0.1:3000:3000"
|
|
environment:
|
|
- NEXT_PUBLIC_API_URL=https://2026fifa.wooo.work/api
|
|
depends_on:
|
|
fifa2026-backend:
|
|
condition: service_healthy
|
|
networks:
|
|
- wc2026-net
|
|
|
|
fifa2026-alerts:
|
|
build:
|
|
context: ./platform/alerts
|
|
restart: always
|
|
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:
|