mirror of
https://github.com/azerothcore/azerothcore-wotlk.git
synced 2025-12-05 18:20:24 -08:00
201 lines
5.6 KiB
YAML
201 lines
5.6 KiB
YAML
version: '3.9'
|
|
|
|
# extension field: https://docs.docker.com/compose/compose-file/compose-file-v3/#extension-fields
|
|
x-networks: &networks
|
|
networks:
|
|
- ac-network
|
|
|
|
x-ac-shared-conf: &ac-shared-conf
|
|
<<: *networks
|
|
working_dir: /azerothcore
|
|
depends_on:
|
|
ac-database:
|
|
condition: service_healthy
|
|
|
|
services:
|
|
#============================
|
|
#
|
|
# Abstract services to extend
|
|
#
|
|
#============================
|
|
|
|
abstract-bind:
|
|
image: local/azerothcore/abstract-bind
|
|
volumes:
|
|
- .:/azerothcore/
|
|
# env dir shared between services
|
|
# we cannot use /env/dist to avoid permission issues
|
|
- ac-env:/azerothcore/env
|
|
# expose some dist folder outside allowing the host to use them
|
|
- ${DOCKER_VOL_CONF:-./conf}:/azerothcore/conf
|
|
- ${DOCKER_VOL_ETC:-./env/docker/etc}:/azerothcore/env/dist/etc
|
|
# [osxfs optimization]: https://stackoverflow.com/a/63437557/1964544
|
|
- ${DOCKER_VOL_LOGS:-./env/docker/logs}:/azerothcore/env/dist/logs:delegated
|
|
- ${DOCKER_VOL_DATA:-./env/docker/data}:/azerothcore/env/dist/data:delegated
|
|
profiles: [abstract-service] # do not run this
|
|
|
|
abstract-no-bind:
|
|
image: local/azerothcore/abstract-no-bind
|
|
volumes:
|
|
- ac-proj:/azerothcore/
|
|
profiles: [abstract-service] # do not run this
|
|
|
|
#=======================
|
|
#
|
|
# Applications
|
|
#
|
|
#=======================
|
|
|
|
|
|
ac-database:
|
|
<<: *networks
|
|
image: mysql:8.0
|
|
restart: unless-stopped
|
|
cap_add:
|
|
- SYS_NICE # CAP_SYS_NICE
|
|
ports:
|
|
- ${DOCKER_DB_EXTERNAL_PORT:-3306}:3306
|
|
environment:
|
|
- MYSQL_ROOT_PASSWORD=${DOCKER_DB_ROOT_PASSWORD:-password}
|
|
volumes:
|
|
- type: volume
|
|
source: ac-database
|
|
target: /var/lib/mysql
|
|
healthcheck:
|
|
test: "/usr/bin/mysql --user=root --password=$$MYSQL_ROOT_PASSWORD --execute \"SHOW DATABASES;\""
|
|
interval: 5s
|
|
timeout: 10s
|
|
retries: 40
|
|
|
|
|
|
ac-worldserver:
|
|
<<: *ac-shared-conf
|
|
extends: ${DOCKER_EXTENDS_BIND:-abstract-bind}
|
|
stdin_open: true
|
|
tty: true
|
|
command: ./acore.sh run-worldserver
|
|
image: acore/worldserver:${DOCKER_IMAGE_TAG:-master} # name of the generated image after built locally
|
|
restart: unless-stopped
|
|
env_file:
|
|
${DOCKER_AC_ENV_FILE:-conf/dist/env.ac}
|
|
user: ${DOCKER_USER:-acore}
|
|
privileged: true
|
|
build:
|
|
context: .
|
|
target: ${DOCKER_BUILD_WORLD_TARGET:-worldserver-local}
|
|
dockerfile: ./apps/docker/Dockerfile
|
|
args:
|
|
USER_ID: ${DOCKER_USER_ID:-1000}
|
|
GROUP_ID: ${DOCKER_GROUP_ID:-1000}
|
|
DOCKER_USER: ${DOCKER_USER:-acore}
|
|
cache_from:
|
|
- acore/authserver:${DOCKER_IMAGE_TAG:-master}
|
|
- acore/dev-server:${DOCKER_IMAGE_TAG:-master}
|
|
ports:
|
|
- ${DOCKER_WORLD_EXTERNAL_PORT:-8085}:8085
|
|
- ${DOCKER_SOAP_EXTERNAL_PORT:-7878}:7878
|
|
profiles: [all, app, worldserver]
|
|
|
|
ac-authserver:
|
|
<<: *ac-shared-conf
|
|
extends: ${DOCKER_EXTENDS_BIND:-abstract-bind}
|
|
tty: true
|
|
command: ./acore.sh run-authserver
|
|
image: acore/authserver:${DOCKER_IMAGE_TAG:-master} # name of the generated image after built locally
|
|
restart: unless-stopped
|
|
env_file:
|
|
${DOCKER_AC_ENV_FILE:-conf/dist/env.ac}
|
|
user: ${DOCKER_USER:-acore}
|
|
build:
|
|
context: .
|
|
target: ${DOCKER_BUILD_AUTH_TARGET:-authserver-local}
|
|
dockerfile: ./apps/docker/Dockerfile
|
|
args:
|
|
USER_ID: ${DOCKER_USER_ID:-1000}
|
|
GROUP_ID: ${DOCKER_GROUP_ID:-1000}
|
|
DOCKER_USER: ${DOCKER_USER:-acore}
|
|
cache_from:
|
|
- acore/worldserver:${DOCKER_IMAGE_TAG:-master}
|
|
- acore/dev-server:${DOCKER_IMAGE_TAG:-master}
|
|
ports:
|
|
- ${DOCKER_AUTH_EXTERNAL_PORT:-3724}:3724
|
|
profiles: [all, app, authserver]
|
|
|
|
#======================
|
|
#
|
|
# Dev services
|
|
#
|
|
#======================
|
|
ac-build:
|
|
<<: *ac-shared-conf
|
|
extends: ${DOCKER_EXTENDS_BIND:-abstract-bind}
|
|
image: acore/dev-server:${DOCKER_IMAGE_TAG:-master}
|
|
build:
|
|
context: .
|
|
target: dev
|
|
dockerfile: ./apps/docker/Dockerfile
|
|
args:
|
|
USER_ID: ${DOCKER_USER_ID:-1000}
|
|
GROUP_ID: ${DOCKER_GROUP_ID:-1000}
|
|
DOCKER_USER: ${DOCKER_USER:-acore}
|
|
cache_from:
|
|
- acore/dev-server:${DOCKER_IMAGE_TAG:-master}
|
|
env_file:
|
|
${DOCKER_AC_ENV_FILE:-conf/dist/env.ac}
|
|
working_dir: /azerothcore/
|
|
volumes:
|
|
- ac-build:/azerothcore/var/build
|
|
# use internal copied files instead of volumes
|
|
- /azerothcore/src
|
|
- /azerothcore/data
|
|
- /azerothcore/modules
|
|
profiles: [all, build]
|
|
|
|
ac-dev-server:
|
|
<<: *ac-shared-conf
|
|
extends: ${DOCKER_EXTENDS_BIND:-abstract-bind}
|
|
tty: true
|
|
image: acore/dev-server:${DOCKER_IMAGE_TAG:-master}
|
|
build:
|
|
context: .
|
|
target: dev
|
|
dockerfile: ./apps/docker/Dockerfile
|
|
args:
|
|
USER_ID: ${DOCKER_USER_ID:-1000}
|
|
GROUP_ID: ${DOCKER_GROUP_ID:-1000}
|
|
DOCKER_USER: ${DOCKER_USER:-acore}
|
|
cache_from:
|
|
- acore/dev-server:${DOCKER_IMAGE_TAG:-master}
|
|
security_opt:
|
|
- seccomp:unconfined
|
|
env_file:
|
|
${DOCKER_AC_ENV_FILE:-conf/dist/env.ac}
|
|
user: ${DOCKER_USER:-acore}
|
|
environment:
|
|
DBLIST: AUTH,CHARACTERS,WORLD
|
|
ports:
|
|
- ${DOCKER_AUTH_EXTERNAL_PORT:-3724}:3724
|
|
- ${DOCKER_WORLD_EXTERNAL_PORT:-8085}:8085
|
|
- ${DOCKER_SOAP_EXTERNAL_PORT:-7878}:7878
|
|
volumes:
|
|
- ac-build-dev:/azerothcore/var/build
|
|
profiles: [all, dev]
|
|
depends_on:
|
|
ac-database:
|
|
condition: service_healthy
|
|
|
|
volumes:
|
|
ac-database:
|
|
ac-env:
|
|
ac-build-dev:
|
|
ac-build:
|
|
ac-proj:
|
|
# not used, but you can use them by setting
|
|
# the DOCKER_VOL_* env variabiles
|
|
ac-conf:
|
|
ac-etc:
|
|
ac-logs:
|
|
ac-client-data:
|
|
|
|
networks:
|
|
ac-network:
|