This commit is contained in:
2025-07-19 17:24:17 +02:00
parent 9d152d813a
commit 75640eba0d

View File

@@ -2,26 +2,25 @@ version: '3.8'
services:
# PostgreSQL Database
postgres:
image: postgres:15-alpine
container_name: tournament-postgres-prod
environment:
POSTGRES_DB: tournament
POSTGRES_USER: tournament_user
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-change_me_in_production}
volumes:
- postgres_data:/var/lib/postgresql/data
- ../prisma/migrations:/docker-entrypoint-initdb.d
ports:
- "127.0.0.1:5432:5432" # Only accessible from localhost
healthcheck:
test: ["CMD-SHELL", "pg_isready -U tournament_user -d tournament"]
interval: 10s
timeout: 5s
retries: 5
networks:
- tournament-network
restart: unless-stopped
# 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:
@@ -30,7 +29,8 @@ services:
dockerfile: docker/Dockerfile
container_name: tournament-app-prod
environment:
- DATABASE_URL=postgresql://tournament_user:${POSTGRES_PASSWORD:-change_me_in_production}@postgres:5432/tournament
- DATABASE_URL=postgresql://admin:puW6KHfe3viQRyR7@sheldon:5432/tournament
# - DATABASE_URL=postgresql://tournament_user:${POSTGRES_PASSWORD:-change_me_in_production}@postgres:5432/tournament
- PORT=4000
- JWT_SECRET=${JWT_SECRET:-change_me_in_production}
- ADMIN_USERNAME=${ADMIN_USERNAME:-admin}
@@ -92,4 +92,4 @@ networks:
driver: bridge
ipam:
config:
- subnet: 172.20.0.0/16
- subnet: 172.20.0.0/16