a9c5cacec8
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
129 lines
3.9 KiB
YAML
129 lines
3.9 KiB
YAML
name: vmangos
|
|
x-server: &server
|
|
image: vmangos-production:local
|
|
build:
|
|
context: ../..
|
|
dockerfile: deploy/production/Dockerfile
|
|
args:
|
|
BUILD_JOBS: ${BUILD_JOBS:-2}
|
|
restart: unless-stopped
|
|
init: true
|
|
read_only: true
|
|
cap_drop: [ALL]
|
|
security_opt: [no-new-privileges:true]
|
|
tmpfs:
|
|
- /run/vmangos:uid=10001,gid=10001,mode=0700
|
|
- /tmp:uid=10001,gid=10001,mode=1777
|
|
secrets: [db_password]
|
|
environment: &environment
|
|
DB_HOST: db
|
|
PLAYER_LIMIT: ${PLAYER_LIMIT:-100}
|
|
WOW_PATCH: ${WOW_PATCH:-10}
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: 10m
|
|
max-file: "5"
|
|
services:
|
|
db:
|
|
image: mariadb:10.11@sha256:7db29378d4fdab73f8123bbc2b48905c90d1a4b00cf848b028f1e81e623257f2
|
|
restart: unless-stopped
|
|
environment:
|
|
MARIADB_ROOT_PASSWORD_FILE: /run/secrets/db_root_password
|
|
secrets: [db_password, db_root_password]
|
|
command: [--character-set-server=utf8mb4, --collation-server=utf8mb4_unicode_ci, --max-allowed-packet=128M, --sql-mode=NO_ENGINE_SUBSTITUTION]
|
|
volumes:
|
|
- db:/var/lib/mysql
|
|
- ./init-db.sh:/docker-entrypoint-initdb.d/01-init.sh:ro
|
|
- ../../sql:/source-sql:ro
|
|
- ./database:/seed:ro
|
|
healthcheck:
|
|
test: [CMD-SHELL, "test -f /var/lib/mysql/.vmangos-initialized && healthcheck.sh --connect --innodb_initialized"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 30
|
|
start_period: 60s
|
|
logging:
|
|
driver: json-file
|
|
options: {max-size: 10m, max-file: "5"}
|
|
realmd:
|
|
<<: *server
|
|
command: [realmd]
|
|
healthcheck:
|
|
test: [CMD, python3, -c, "import socket; socket.create_connection(('127.0.0.1',3724),5).close()"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 30s
|
|
ports: ["3724:3724/tcp"]
|
|
volumes:
|
|
- auth_logs:/var/log/vmangos
|
|
mangosd:
|
|
<<: *server
|
|
command: [mangosd]
|
|
environment:
|
|
<<: *environment
|
|
TZ: Europe/Moscow
|
|
PARTY_BOT_MAX_BOTS: ${PARTY_BOT_MAX_BOTS:-4}
|
|
BATTLE_BOT_AUTO_JOIN: ${BATTLE_BOT_AUTO_JOIN:-0}
|
|
RATE_DROP_ITEM_QUEST: ${RATE_DROP_ITEM_QUEST:-2}
|
|
MOONWELL_VOICE_ENABLE: ${MOONWELL_VOICE_ENABLE:-0}
|
|
MOONWELL_VOICE_ADDRESS: ${MOONWELL_VOICE_ADDRESS:-}
|
|
MOONWELL_VOICE_FEED: voice-relay:3726
|
|
secrets: [db_password, voice_secret]
|
|
healthcheck:
|
|
test: [CMD, python3, -c, "import socket; socket.create_connection(('127.0.0.1',8085),5).close()"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 5m
|
|
ports: ["8085:8085/tcp"]
|
|
stop_grace_period: 2m
|
|
volumes:
|
|
- ./data:/data:ro
|
|
- ./entrypoint.py:/opt/entrypoint.py:ro
|
|
- world_logs:/var/log/vmangos
|
|
voice-relay:
|
|
image: ubuntu:24.04@sha256:33ceb71981b602c1a7443a53469e4dba065f7503eab3078a2d7a57a2ab987517
|
|
restart: unless-stopped
|
|
init: true
|
|
read_only: true
|
|
cap_drop: [ALL]
|
|
security_opt: [no-new-privileges:true]
|
|
user: "10001:10001"
|
|
command: [/opt/voice/moonwell-voice-relay, --listen, "0.0.0.0:3725", --feed, "0.0.0.0:3726", --secret-file, /run/secrets/voice_secret]
|
|
secrets: [voice_secret]
|
|
ports: ["3725:3725/udp"]
|
|
volumes:
|
|
- ./voice:/opt/voice:ro
|
|
logging:
|
|
driver: json-file
|
|
options: {max-size: 10m, max-file: "5"}
|
|
realm-config:
|
|
image: mariadb:10.11@sha256:7db29378d4fdab73f8123bbc2b48905c90d1a4b00cf848b028f1e81e623257f2
|
|
profiles: [tools]
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
secrets: [db_password]
|
|
environment:
|
|
REALM_ADDRESS: ${REALM_ADDRESS:?Set REALM_ADDRESS in .env}
|
|
REALM_NAME: ${REALM_NAME:-Russian Vanilla}
|
|
volumes:
|
|
- ./set-realm.sh:/set-realm.sh:ro
|
|
entrypoint: [bash, /set-realm.sh]
|
|
volumes:
|
|
db:
|
|
auth_logs:
|
|
world_logs:
|
|
secrets:
|
|
db_password:
|
|
file: ./secrets/db_password
|
|
db_root_password:
|
|
file: ./secrets/db_root_password
|
|
voice_secret:
|
|
file: ./secrets/voice_secret
|