This commit is contained in:
2025-07-19 12:21:46 +02:00
parent 12822dfdbf
commit 2e7957d0a0
86 changed files with 25573 additions and 0 deletions

70
docker/docker-compose.yml Normal file
View File

@@ -0,0 +1,70 @@
version: '3.8'
services:
# PostgreSQL Database
postgres:
image: postgres:15-alpine
container_name: tournament-postgres
environment:
POSTGRES_DB: tournament
POSTGRES_USER: tournament_user
POSTGRES_PASSWORD: tournament_password
volumes:
- postgres_data:/var/lib/postgresql/data
- ./prisma/migrations:/docker-entrypoint-initdb.d
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U tournament_user -d tournament"]
interval: 10s
timeout: 5s
retries: 5
networks:
- tournament-network
# Tournament Application
tournament-app:
build:
context: ..
dockerfile: docker/Dockerfile
container_name: tournament-app
environment:
- DATABASE_URL=postgresql://tournament_user:tournament_password@postgres:5432/tournament
- PORT=4000
- JWT_SECRET=your-super-secret-jwt-key-change-in-production
- ADMIN_USERNAME=admin
- ADMIN_PASSWORD=admin123
- ADMIN_EMAIL=admin@tournament.com
ports:
- "4000:4000"
depends_on:
postgres:
condition: service_healthy
volumes:
- ../prisma:/app/prisma
networks:
- tournament-network
restart: unless-stopped
# Nginx Reverse Proxy (Optional)
nginx:
image: nginx:alpine
container_name: tournament-nginx
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- ./ssl:/etc/nginx/ssl:ro
depends_on:
- tournament-app
networks:
- tournament-network
restart: unless-stopped
volumes:
postgres_data:
networks:
tournament-network:
driver: bridge