49 lines
1.2 KiB
YAML
49 lines
1.2 KiB
YAML
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
environment:
|
|
POSTGRES_DB: vanguard
|
|
POSTGRES_USER: vanguard
|
|
POSTGRES_PASSWORD: vanguard
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U vanguard -d vanguard"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 20
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
command: ["redis-server", "--appendonly", "yes"]
|
|
volumes:
|
|
- redisdata:/data
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 20
|
|
|
|
server:
|
|
build:
|
|
context: .
|
|
dockerfile: server/src/Vanguard.Server/Dockerfile
|
|
ports:
|
|
- "${VANGUARD_PORT:-8080}:8080"
|
|
environment:
|
|
ASPNETCORE_URLS: http://+:8080
|
|
Game__PublicWsUrl: ${VANGUARD_WS_URL:-ws://localhost:8080/game}
|
|
Storage__Provider: Postgres
|
|
Storage__ConnectionString: Host=postgres;Port=5432;Database=vanguard;Username=vanguard;Password=vanguard
|
|
Redis__Configuration: redis:6379
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
pgdata:
|
|
redisdata:
|