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