You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
125 lines
2.8 KiB
YAML
125 lines
2.8 KiB
YAML
services:
|
|
# Frontend
|
|
frontend:
|
|
build:
|
|
context: ./frontend
|
|
dockerfile: Dockerfile
|
|
ports:
|
|
- "3000:3000"
|
|
environment:
|
|
- NODE_ENV=development
|
|
volumes:
|
|
- ./frontend:/app
|
|
- /app/node_modules
|
|
depends_on:
|
|
- api-gateway
|
|
|
|
# API Gateway
|
|
api-gateway:
|
|
build:
|
|
context: ./backend/services/api-gateway
|
|
dockerfile: Dockerfile
|
|
ports:
|
|
- "8000:8000"
|
|
environment:
|
|
- GAME_SERVICE_URL=http://game-service:8001
|
|
- QUESTION_SERVICE_URL=http://question-service:8002
|
|
- PLAYER_SERVICE_URL=http://player-service:8003
|
|
- ADMIN_SERVICE_URL=http://admin-service:8004
|
|
- DATABASE_URL=sqlite:///./know_foolery.db
|
|
volumes:
|
|
- ./backend/shared:/app/shared
|
|
- ./backend/database:/app/database
|
|
- database_data:/app/data
|
|
depends_on:
|
|
- game-service
|
|
- question-service
|
|
- player-service
|
|
- admin-service
|
|
|
|
# Game Service
|
|
game-service:
|
|
build:
|
|
context: ./backend/services/game-service
|
|
dockerfile: Dockerfile
|
|
ports:
|
|
- "8001:8001"
|
|
environment:
|
|
- DATABASE_URL=sqlite:///./know_foolery.db
|
|
- DEBUG=false
|
|
volumes:
|
|
- ./backend/shared:/app/shared
|
|
- ./backend/database:/app/database
|
|
- database_data:/app/data
|
|
|
|
# Question Service
|
|
question-service:
|
|
build:
|
|
context: ./backend/services/question-service
|
|
dockerfile: Dockerfile
|
|
ports:
|
|
- "8002:8002"
|
|
environment:
|
|
- DATABASE_URL=sqlite:///./know_foolery.db
|
|
- DEBUG=false
|
|
volumes:
|
|
- ./backend/shared:/app/shared
|
|
- ./backend/database:/app/database
|
|
- database_data:/app/data
|
|
|
|
# Player Service
|
|
player-service:
|
|
build:
|
|
context: ./backend/services/player-service
|
|
dockerfile: Dockerfile
|
|
ports:
|
|
- "8003:8003"
|
|
environment:
|
|
- DATABASE_URL=sqlite:///./know_foolery.db
|
|
- DEBUG=false
|
|
volumes:
|
|
- ./backend/shared:/app/shared
|
|
- ./backend/database:/app/database
|
|
- database_data:/app/data
|
|
|
|
# Admin Service
|
|
admin-service:
|
|
build:
|
|
context: ./backend/services/admin-service
|
|
dockerfile: Dockerfile
|
|
ports:
|
|
- "8004:8004"
|
|
environment:
|
|
- DATABASE_URL=sqlite:///./know_foolery.db
|
|
- JWT_SECRET_KEY=${JWT_SECRET_KEY}
|
|
- DEBUG=false
|
|
volumes:
|
|
- ./backend/shared:/app/shared
|
|
- ./backend/database:/app/database
|
|
- database_data:/app/data
|
|
|
|
# Redis for caching and sessions
|
|
redis:
|
|
image: redis:7-alpine
|
|
ports:
|
|
- "6379:6379"
|
|
command: redis-server --appendonly yes
|
|
volumes:
|
|
- redis_data:/data
|
|
|
|
# Nginx reverse proxy (optional for production)
|
|
nginx:
|
|
image: nginx:alpine
|
|
ports:
|
|
- "80:80"
|
|
volumes:
|
|
- ./nginx.conf:/etc/nginx/nginx.conf
|
|
depends_on:
|
|
- frontend
|
|
- api-gateway
|
|
profiles:
|
|
- production
|
|
|
|
volumes:
|
|
redis_data:
|
|
database_data: |