feat(Apps/Docker): Use Env Vars for docker configuration (#17040)
* feat(docker): Use Env Vars for docker configuration use env vars for docker * simplify docker-compose.yaml
This commit is contained in:
parent
5367eb4b1d
commit
f241a6e352
@ -6,15 +6,6 @@
|
|||||||
/env/dist/*
|
/env/dist/*
|
||||||
!/env/dist/.gitkeep
|
!/env/dist/.gitkeep
|
||||||
/env/user/*
|
/env/user/*
|
||||||
/env/docker/*
|
|
||||||
!/env/docker/bin/.gitkeep
|
|
||||||
!/env/docker/data/.gitkeep
|
|
||||||
!/env/docker/etc/
|
|
||||||
/env/docker/etc/*
|
|
||||||
!/env/docker/etc/authserver.conf.dockerdist
|
|
||||||
!/env/docker/etc/worldserver.conf.dockerdist
|
|
||||||
!/env/docker/etc/dbimport.conf.dockerdist
|
|
||||||
!/env/docker/logs/.gitkeep
|
|
||||||
/.env*
|
/.env*
|
||||||
.idea
|
.idea
|
||||||
!.gitkeep
|
!.gitkeep
|
||||||
|
|||||||
7
.gitignore
vendored
7
.gitignore
vendored
@ -17,13 +17,6 @@
|
|||||||
/env/dist/*
|
/env/dist/*
|
||||||
!/env/dist/.gitkeep
|
!/env/dist/.gitkeep
|
||||||
/env/user/*
|
/env/user/*
|
||||||
/env/docker/*
|
|
||||||
!/env/docker/bin/.gitkeep
|
|
||||||
!/env/docker/data/.gitkeep
|
|
||||||
!/env/docker/etc/
|
|
||||||
/env/docker/etc/*
|
|
||||||
!/env/docker/etc/*.conf.dockerdist
|
|
||||||
!/env/docker/logs/.gitkeep
|
|
||||||
/.env*
|
/.env*
|
||||||
/apps/joiner
|
/apps/joiner
|
||||||
/deps/deno
|
/deps/deno
|
||||||
|
|||||||
@ -143,32 +143,6 @@ function comp_compile() {
|
|||||||
find "$AC_BINPATH_FULL" -mindepth 1 -maxdepth 1 -type f -exec sudo chown root:root -- {} +
|
find "$AC_BINPATH_FULL" -mindepth 1 -maxdepth 1 -type f -exec sudo chown root:root -- {} +
|
||||||
find "$AC_BINPATH_FULL" -mindepth 1 -maxdepth 1 -type f -exec sudo chmod u+s -- {} +
|
find "$AC_BINPATH_FULL" -mindepth 1 -maxdepth 1 -type f -exec sudo chmod u+s -- {} +
|
||||||
|
|
||||||
DOCKER_ETC_FOLDER=${DOCKER_ETC_FOLDER:-"env/dist/etc"}
|
|
||||||
|
|
||||||
if [[ $DOCKER = 1 && $DISABLE_DOCKER_CONF != 1 ]]; then
|
|
||||||
echo "Generating confs..."
|
|
||||||
|
|
||||||
# Search for all configs under DOCKER_ETC_FOLDER
|
|
||||||
for dockerdist in "$DOCKER_ETC_FOLDER"/*.dockerdist; do
|
|
||||||
# Grab "base" conf. turns foo.conf.dockerdist into foo.conf
|
|
||||||
baseConf="$(echo "$dockerdist" | rev | cut -f1 -d. --complement | rev)"
|
|
||||||
# env/dist/etc/foo.conf becomes foo.conf
|
|
||||||
filename="$(basename "$baseConf")"
|
|
||||||
# the dist files should be always found inside $confDir
|
|
||||||
# which may not be the same as DOCKER_ETC_FOLDER
|
|
||||||
distPath="$confDir/$filename.dist"
|
|
||||||
# if dist file doesn't exist, skip this iteration
|
|
||||||
[ ! -f "$distPath" ] && continue
|
|
||||||
|
|
||||||
# replace params in foo.conf.dist with params in foo.conf.dockerdist
|
|
||||||
conf_layer "$dockerdist" "$distPath" " # Copied from dockerdist"
|
|
||||||
|
|
||||||
# Copy modified dist file to $confDir/$filename
|
|
||||||
# Don't overwrite foo.conf if it already exists.
|
|
||||||
cp --no-clobber --verbose "$distPath" "$confDir/$filename"
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Done"
|
echo "Done"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@ -185,36 +159,3 @@ function comp_all() {
|
|||||||
comp_clean
|
comp_clean
|
||||||
comp_build
|
comp_build
|
||||||
}
|
}
|
||||||
|
|
||||||
# conf_layer FILENAME FILENAME
|
|
||||||
# Layer the configuration parameters from the first argument onto the second argument
|
|
||||||
function conf_layer() {
|
|
||||||
LAYER="$1"
|
|
||||||
BASE="$2"
|
|
||||||
COMMENT="$3"
|
|
||||||
|
|
||||||
# Loop over all defined params in conf file
|
|
||||||
grep -E "^[a-zA-Z\.0-9]+\s*=.*$" "$LAYER" \
|
|
||||||
| while read -r param
|
|
||||||
do
|
|
||||||
# remove spaces from param
|
|
||||||
# foo = bar becomes foo=bar
|
|
||||||
NOSPACE="$(tr -d '[:space:]' <<< "$param")"
|
|
||||||
|
|
||||||
# split into key and value
|
|
||||||
KEY="$(cut -f1 -d= <<< "$NOSPACE")"
|
|
||||||
VAL="$(cut -f2 -d= <<< "$NOSPACE")"
|
|
||||||
# if key in base and val not in line
|
|
||||||
if grep -qE "^$KEY" "$BASE" && ! grep -qE "^$KEY.*=.*$VAL" "$BASE"; then
|
|
||||||
# Replace line
|
|
||||||
# Prevent issues with shell quoting
|
|
||||||
sed -i \
|
|
||||||
's,^'"$KEY"'.*,'"$KEY = $VAL$COMMENT"',g' \
|
|
||||||
"$BASE"
|
|
||||||
else
|
|
||||||
# insert line
|
|
||||||
echo "$KEY = $VAL$COMMENT" >> "$BASE"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
echo "Layered $LAYER onto $BASE"
|
|
||||||
}
|
|
||||||
|
|||||||
@ -100,11 +100,6 @@ USER $DOCKER_USER
|
|||||||
# NOTE: this folder is different by the /azerothcore (which is binded instead)
|
# NOTE: this folder is different by the /azerothcore (which is binded instead)
|
||||||
COPY --chown=$DOCKER_USER:$DOCKER_USER . /azerothcore
|
COPY --chown=$DOCKER_USER:$DOCKER_USER . /azerothcore
|
||||||
|
|
||||||
# Needed if we use the dev image without linking any external folder (e.g. acore-docker)
|
|
||||||
COPY --chown=$DOCKER_USER:$DOCKER_USER env/docker/etc/authserver.conf.dockerdist /azerothcore/env/dist/etc/authserver.conf.dockerdist
|
|
||||||
COPY --chown=$DOCKER_USER:$DOCKER_USER env/docker/etc/worldserver.conf.dockerdist /azerothcore/env/dist/etc/worldserver.conf.dockerdist
|
|
||||||
COPY --chown=$DOCKER_USER:$DOCKER_USER env/docker/etc/dbimport.conf.dockerdist /azerothcore/env/dist/etc/dbimport.conf.dockerdist
|
|
||||||
|
|
||||||
#================================================================
|
#================================================================
|
||||||
#
|
#
|
||||||
# SERVICE BASE: prepare the OS for the production-ready services
|
# SERVICE BASE: prepare the OS for the production-ready services
|
||||||
@ -211,9 +206,6 @@ COPY --chown=$DOCKER_USER:$DOCKER_USER ./modules /azerothcore/modules
|
|||||||
# check if we have ccache files available outside
|
# check if we have ccache files available outside
|
||||||
RUN rm -rf /azerothcore/var/ccache/*
|
RUN rm -rf /azerothcore/var/ccache/*
|
||||||
COPY --chown=$DOCKER_USER:$DOCKER_USER var/docker/ccache /azerothcore/var/ccache
|
COPY --chown=$DOCKER_USER:$DOCKER_USER var/docker/ccache /azerothcore/var/ccache
|
||||||
COPY --chown=$DOCKER_USER:$DOCKER_USER env/docker/etc/authserver.conf.dockerdist /azerothcore/env/dist/etc/authserver.conf.dockerdist
|
|
||||||
COPY --chown=$DOCKER_USER:$DOCKER_USER env/docker/etc/worldserver.conf.dockerdist /azerothcore/env/dist/etc/worldserver.conf.dockerdist
|
|
||||||
COPY --chown=$DOCKER_USER:$DOCKER_USER env/docker/etc/dbimport.conf.dockerdist /azerothcore/env/dist/etc/dbimport.conf.dockerdist
|
|
||||||
|
|
||||||
# install eluna
|
# install eluna
|
||||||
RUN git clone --depth=1 --branch=master https://github.com/azerothcore/mod-eluna.git /azerothcore/modules/mod-eluna
|
RUN git clone --depth=1 --branch=master https://github.com/azerothcore/mod-eluna.git /azerothcore/modules/mod-eluna
|
||||||
|
|||||||
6
conf/dist/env.docker
vendored
6
conf/dist/env.docker
vendored
@ -9,11 +9,7 @@ DOCKER_VOL_ROOT=
|
|||||||
DOCKER_VOL_CONF=
|
DOCKER_VOL_CONF=
|
||||||
DOCKER_VOL_ETC=
|
DOCKER_VOL_ETC=
|
||||||
DOCKER_VOL_LOGS=
|
DOCKER_VOL_LOGS=
|
||||||
DOCKER_VOL_DATA_CAMERAS=
|
DOCKER_VOL_DATA=
|
||||||
DOCKER_VOL_DATA_DBC=
|
|
||||||
DOCKER_VOL_DATA_MAPS=
|
|
||||||
DOCKER_VOL_DATA_VMAPS=
|
|
||||||
DOCKER_VOL_DATA_MMAPS=
|
|
||||||
|
|
||||||
DOCKER_WORLD_EXTERNAL_PORT=
|
DOCKER_WORLD_EXTERNAL_PORT=
|
||||||
DOCKER_SOAP_EXTERNAL_PORT=
|
DOCKER_SOAP_EXTERNAL_PORT=
|
||||||
|
|||||||
@ -33,9 +33,9 @@ x-ac-service-conf: &ac-service-conf
|
|||||||
<<: *ac-shared-conf
|
<<: *ac-shared-conf
|
||||||
# List can't be merged. See: https://forums.docker.com/t/how-to-merge-a-list-of-volumes-from-an-extension-field-into-the-service-definition/77454
|
# List can't be merged. See: https://forums.docker.com/t/how-to-merge-a-list-of-volumes-from-an-extension-field-into-the-service-definition/77454
|
||||||
# volumes:
|
# volumes:
|
||||||
# - ${DOCKER_VOL_ETC:-./env/docker/etc}:/azerothcore/env/dist/etc
|
# - ${DOCKER_VOL_ETC:-./env/dist/etc}:/azerothcore/env/dist/etc
|
||||||
# # [osxfs optimization]: https://stackoverflow.com/a/63437557/1964544
|
# # [osxfs optimization]: https://stackoverflow.com/a/63437557/1964544
|
||||||
# - ${DOCKER_VOL_LOGS:-./env/docker/logs}:/azerothcore/env/dist/logs:delegated
|
# - ${DOCKER_VOL_LOGS:-./env/dist/logs}:/azerothcore/env/dist/logs:delegated
|
||||||
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
@ -94,7 +94,7 @@ services:
|
|||||||
# expose some dist folder outside allowing the host to use them
|
# expose some dist folder outside allowing the host to use them
|
||||||
- ${DOCKER_VOL_CONF:-./conf}:/azerothcore/conf
|
- ${DOCKER_VOL_CONF:-./conf}:/azerothcore/conf
|
||||||
- ${DOCKER_VOL_BIN:-ac-bin-dev}:/azerothcore/env/dist/bin
|
- ${DOCKER_VOL_BIN:-ac-bin-dev}:/azerothcore/env/dist/bin
|
||||||
- ${DOCKER_VOL_ETC:-./env/docker/etc}:/azerothcore/env/dist/etc
|
- ${DOCKER_VOL_ETC:-./env/dist/etc}:/azerothcore/env/dist/etc
|
||||||
- ac-build-dev:/azerothcore/var/build
|
- ac-build-dev:/azerothcore/var/build
|
||||||
- ac-ccache-dev:/azerothcore/var/ccache
|
- ac-ccache-dev:/azerothcore/var/ccache
|
||||||
profiles: [dev-build]
|
profiles: [dev-build]
|
||||||
@ -118,32 +118,22 @@ services:
|
|||||||
- seccomp:unconfined
|
- seccomp:unconfined
|
||||||
env_file:
|
env_file:
|
||||||
${DOCKER_AC_ENV_FILE:-conf/dist/env.ac}
|
${DOCKER_AC_ENV_FILE:-conf/dist/env.ac}
|
||||||
|
environment:
|
||||||
|
AC_DATA_DIR: "/azerothcore/env/dist/data"
|
||||||
|
AC_LOGS_DIR: "/azerothcore/env/dist/logs"
|
||||||
|
AC_LOGIN_DATABASE_INFO: "ac-database;3306;root;password;acore_auth"
|
||||||
|
AC_WORLD_DATABASE_INFO: "ac-database;3306;root;password;acore_world"
|
||||||
|
AC_CHARACTER_DATABASE_INFO: "ac-database;3306;root;password;acore_characters"
|
||||||
|
AC_CLOSE_IDLE_CONNECTIONS: "0"
|
||||||
ports:
|
ports:
|
||||||
- ${DOCKER_AUTH_EXTERNAL_PORT:-3724}:3724
|
- ${DOCKER_AUTH_EXTERNAL_PORT:-3724}:3724
|
||||||
- ${DOCKER_WORLD_EXTERNAL_PORT:-8085}:8085
|
- ${DOCKER_WORLD_EXTERNAL_PORT:-8085}:8085
|
||||||
- ${DOCKER_SOAP_EXTERNAL_PORT:-7878}:7878
|
- ${DOCKER_SOAP_EXTERNAL_PORT:-7878}:7878
|
||||||
volumes:
|
volumes:
|
||||||
- ${DOCKER_VOL_ROOT:-.}:/azerothcore:cached
|
- ${DOCKER_VOL_ROOT:-.}:/azerothcore:cached
|
||||||
# expose some dist folder outside allowing the host to use them
|
|
||||||
- ${DOCKER_VOL_CONF:-./conf}:/azerothcore/conf
|
|
||||||
- ${DOCKER_VOL_BIN:-ac-bin-dev}:/azerothcore/env/dist/bin
|
|
||||||
- ${DOCKER_VOL_ETC:-./env/docker/etc}:/azerothcore/env/dist/etc
|
|
||||||
# [osxfs optimization]: https://stackoverflow.com/a/63437557/1964544
|
# [osxfs optimization]: https://stackoverflow.com/a/63437557/1964544
|
||||||
- ${DOCKER_VOL_LOGS:-./env/docker/logs}:/azerothcore/env/dist/logs:delegated
|
|
||||||
- ac-build-dev:/azerothcore/var/build
|
- ac-build-dev:/azerothcore/var/build
|
||||||
- ac-ccache-dev:/azerothcore/var/ccache
|
- ac-ccache-dev:/azerothcore/var/ccache
|
||||||
# client data
|
|
||||||
- ${DOCKER_VOL_DATA_CAMERAS:-./env/docker/data/Cameras}:/azerothcore/env/dist/data/Cameras
|
|
||||||
- ${DOCKER_VOL_DATA_DBC:-./env/docker/data/dbc}:/azerothcore/env/dist/data/dbc
|
|
||||||
- ${DOCKER_VOL_DATA_MAPS:-./env/docker/data/maps}:/azerothcore/env/dist/data/maps
|
|
||||||
- ${DOCKER_VOL_DATA_VMAPS:-./env/docker/data/vmaps}:/azerothcore/env/dist/data/vmaps
|
|
||||||
- ${DOCKER_VOL_DATA_MMAPS:-./env/docker/data/mmaps}:/azerothcore/env/dist/data/mmaps
|
|
||||||
# remount again for the extractors
|
|
||||||
- ${DOCKER_VOL_DATA_CAMERAS:-./env/docker/data/Cameras}:/azerothcore/env/dist/bin/Cameras
|
|
||||||
- ${DOCKER_VOL_DATA_DBC:-./env/docker/data/dbc}:/azerothcore/env/dist/bin/dbc
|
|
||||||
- ${DOCKER_VOL_DATA_MAPS:-./env/docker/data/maps}:/azerothcore/env/dist/bin/maps
|
|
||||||
- ${DOCKER_VOL_DATA_VMAPS:-./env/docker/data/vmaps}:/azerothcore/env/dist/bin/vmaps
|
|
||||||
- ${DOCKER_VOL_DATA_MMAPS:-./env/docker/data/mmaps}:/azerothcore/env/dist/bin/mmaps
|
|
||||||
# this is not the directory of the extracted data! It's the client folder used by the extractors
|
# this is not the directory of the extracted data! It's the client folder used by the extractors
|
||||||
- ${DOCKER_AC_CLIENT_FOLDER:-./var/client}:/azerothcore/env/dist/bin/Data
|
- ${DOCKER_AC_CLIENT_FOLDER:-./var/client}:/azerothcore/env/dist/bin/Data
|
||||||
profiles: [dev]
|
profiles: [dev]
|
||||||
@ -155,12 +145,19 @@ services:
|
|||||||
<<: *ac-shared-conf
|
<<: *ac-shared-conf
|
||||||
image: acore/ac-wotlk-worldserver-local:${DOCKER_IMAGE_TAG:-master} # name of the generated image after built locally
|
image: acore/ac-wotlk-worldserver-local:${DOCKER_IMAGE_TAG:-master} # name of the generated image after built locally
|
||||||
command: ./env/dist/bin/dbimport
|
command: ./env/dist/bin/dbimport
|
||||||
|
environment:
|
||||||
|
AC_DATA_DIR: "/azerothcore/env/dist/data"
|
||||||
|
AC_LOGS_DIR: "/azerothcore/env/dist/logs"
|
||||||
|
AC_LOGIN_DATABASE_INFO: "ac-database;3306;root;password;acore_auth"
|
||||||
|
AC_WORLD_DATABASE_INFO: "ac-database;3306;root;password;acore_world"
|
||||||
|
AC_CHARACTER_DATABASE_INFO: "ac-database;3306;root;password;acore_characters"
|
||||||
|
AC_CLOSE_IDLE_CONNECTIONS: "0"
|
||||||
volumes:
|
volumes:
|
||||||
# read-only binaries compiled by ac-dev-server
|
# read-only binaries compiled by ac-dev-server
|
||||||
- ${DOCKER_VOL_BIN:-ac-bin-dev}:/azerothcore/env/dist/bin:ro
|
- ${DOCKER_VOL_BIN:-ac-bin-dev}:/azerothcore/env/dist/bin:ro
|
||||||
- ${DOCKER_VOL_ETC:-./env/docker/etc}:/azerothcore/env/dist/etc
|
- ${DOCKER_VOL_ETC:-./env/dist/etc}:/azerothcore/env/dist/etc:ro
|
||||||
# [osxfs optimization]: https://stackoverflow.com/a/63437557/1964544
|
# [osxfs optimization]: https://stackoverflow.com/a/63437557/1964544
|
||||||
- ${DOCKER_VOL_LOGS:-./env/docker/logs}:/azerothcore/env/dist/logs:delegated
|
- ${DOCKER_VOL_LOGS:-./env/dist/logs}:/azerothcore/env/dist/logs:delegated
|
||||||
profiles: [local, app, db-import-local]
|
profiles: [local, app, db-import-local]
|
||||||
depends_on:
|
depends_on:
|
||||||
ac-database:
|
ac-database:
|
||||||
@ -183,6 +180,13 @@ services:
|
|||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
env_file:
|
env_file:
|
||||||
${DOCKER_AC_ENV_FILE:-conf/dist/env.ac}
|
${DOCKER_AC_ENV_FILE:-conf/dist/env.ac}
|
||||||
|
environment:
|
||||||
|
AC_DATA_DIR: "/azerothcore/env/dist/data"
|
||||||
|
AC_LOGS_DIR: "/azerothcore/env/dist/logs"
|
||||||
|
AC_LOGIN_DATABASE_INFO: "ac-database;3306;root;password;acore_auth"
|
||||||
|
AC_WORLD_DATABASE_INFO: "ac-database;3306;root;password;acore_world"
|
||||||
|
AC_CHARACTER_DATABASE_INFO: "ac-database;3306;root;password;acore_characters"
|
||||||
|
AC_CLOSE_IDLE_CONNECTIONS: "0"
|
||||||
user: ${DOCKER_USER:-root}
|
user: ${DOCKER_USER:-root}
|
||||||
privileged: true
|
privileged: true
|
||||||
build:
|
build:
|
||||||
@ -194,15 +198,11 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
# read-only binaries compiled by ac-dev-server
|
# read-only binaries compiled by ac-dev-server
|
||||||
- ${DOCKER_VOL_BIN:-ac-bin-dev}:/azerothcore/env/dist/bin:ro
|
- ${DOCKER_VOL_BIN:-ac-bin-dev}:/azerothcore/env/dist/bin:ro
|
||||||
- ${DOCKER_VOL_ETC:-./env/docker/etc}:/azerothcore/env/dist/etc
|
- ${DOCKER_VOL_ETC:-./env/dist/etc}:/azerothcore/env/dist/etc:ro
|
||||||
# [osxfs optimization]: https://stackoverflow.com/a/63437557/1964544
|
# [osxfs optimization]: https://stackoverflow.com/a/63437557/1964544
|
||||||
- ${DOCKER_VOL_LOGS:-./env/docker/logs}:/azerothcore/env/dist/logs:delegated
|
- ${DOCKER_VOL_LOGS:-./env/dist/logs}:/azerothcore/env/dist/logs:delegated
|
||||||
# client data
|
# client data
|
||||||
- ${DOCKER_VOL_DATA_CAMERAS:-./env/docker/data/Cameras}:/azerothcore/env/dist/data/Cameras
|
- ${DOCKER_VOL_DATA:-./env/dist/data/}:/azerothcore/env/dist/data/
|
||||||
- ${DOCKER_VOL_DATA_DBC:-./env/docker/data/dbc}:/azerothcore/env/dist/data/dbc
|
|
||||||
- ${DOCKER_VOL_DATA_MAPS:-./env/docker/data/maps}:/azerothcore/env/dist/data/maps
|
|
||||||
- ${DOCKER_VOL_DATA_VMAPS:-./env/docker/data/vmaps}:/azerothcore/env/dist/data/vmaps
|
|
||||||
- ${DOCKER_VOL_DATA_MMAPS:-./env/docker/data/mmaps}:/azerothcore/env/dist/data/mmaps
|
|
||||||
profiles: [local, app, worldserver]
|
profiles: [local, app, worldserver]
|
||||||
depends_on:
|
depends_on:
|
||||||
ac-database:
|
ac-database:
|
||||||
@ -218,6 +218,12 @@ services:
|
|||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
env_file:
|
env_file:
|
||||||
${DOCKER_AC_ENV_FILE:-conf/dist/env.ac}
|
${DOCKER_AC_ENV_FILE:-conf/dist/env.ac}
|
||||||
|
environment:
|
||||||
|
AC_LOGS_DIR: "/azerothcore/env/dist/logs"
|
||||||
|
AC_TEMP_DIR: "/azerothcore/env/dist/temp"
|
||||||
|
AC_LOGIN_DATABASE_INFO: "ac-database;3306;root;password;acore_auth"
|
||||||
|
AC_SQLDRIVER_LOG_FILE: "SQLDriver.log"
|
||||||
|
AC_SQLDRIVER_QUERY_LOGGING: "1"
|
||||||
user: ${DOCKER_USER:-root}
|
user: ${DOCKER_USER:-root}
|
||||||
build:
|
build:
|
||||||
target: authserver-local
|
target: authserver-local
|
||||||
@ -225,9 +231,9 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
# read-only binaries compiled by ac-dev-server
|
# read-only binaries compiled by ac-dev-server
|
||||||
- ${DOCKER_VOL_BIN:-ac-bin-dev}:/azerothcore/env/dist/bin:ro
|
- ${DOCKER_VOL_BIN:-ac-bin-dev}:/azerothcore/env/dist/bin:ro
|
||||||
- ${DOCKER_VOL_ETC:-./env/docker/etc}:/azerothcore/env/dist/etc
|
- ${DOCKER_VOL_ETC:-./env/dist/etc}:/azerothcore/env/dist/etc
|
||||||
# [osxfs optimization]: https://stackoverflow.com/a/63437557/1964544
|
# [osxfs optimization]: https://stackoverflow.com/a/63437557/1964544
|
||||||
- ${DOCKER_VOL_LOGS:-./env/docker/logs}:/azerothcore/env/dist/logs:delegated
|
- ${DOCKER_VOL_LOGS:-./env/dist/logs}:/azerothcore/env/dist/logs:delegated
|
||||||
ports:
|
ports:
|
||||||
- ${DOCKER_AUTH_EXTERNAL_PORT:-3724}:3724
|
- ${DOCKER_AUTH_EXTERNAL_PORT:-3724}:3724
|
||||||
profiles: [local, app, authserver]
|
profiles: [local, app, authserver]
|
||||||
@ -281,6 +287,13 @@ services:
|
|||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
env_file:
|
env_file:
|
||||||
${DOCKER_AC_ENV_FILE:-conf/dist/env.ac}
|
${DOCKER_AC_ENV_FILE:-conf/dist/env.ac}
|
||||||
|
environment:
|
||||||
|
AC_DATA_DIR: "/azerothcore/env/dist/data"
|
||||||
|
AC_LOGS_DIR: "/azerothcore/env/dist/logs"
|
||||||
|
AC_LOGIN_DATABASE_INFO: "ac-database;3306;root;password;acore_auth"
|
||||||
|
AC_WORLD_DATABASE_INFO: "ac-database;3306;root;password;acore_world"
|
||||||
|
AC_CHARACTER_DATABASE_INFO: "ac-database;3306;root;password;acore_characters"
|
||||||
|
AC_CLOSE_IDLE_CONNECTIONS: "0"
|
||||||
user: ${DOCKER_USER:-root}
|
user: ${DOCKER_USER:-root}
|
||||||
privileged: true
|
privileged: true
|
||||||
build:
|
build:
|
||||||
@ -290,7 +303,7 @@ services:
|
|||||||
- ${DOCKER_WORLD_EXTERNAL_PORT:-8085}:8085
|
- ${DOCKER_WORLD_EXTERNAL_PORT:-8085}:8085
|
||||||
- ${DOCKER_SOAP_EXTERNAL_PORT:-7878}:7878
|
- ${DOCKER_SOAP_EXTERNAL_PORT:-7878}:7878
|
||||||
volumes:
|
volumes:
|
||||||
- ${DOCKER_VOL_LOGS:-./env/docker/logs}:/azerothcore/env/dist/logs:delegated
|
- ${DOCKER_VOL_LOGS:-./env/dist/logs}:/azerothcore/env/dist/logs:delegated
|
||||||
- ${DOCKER_VOL_CLIENT_DATA_PROD:-ac-client-data-prod}:/azerothcore/env/dist/data:ro
|
- ${DOCKER_VOL_CLIENT_DATA_PROD:-ac-client-data-prod}:/azerothcore/env/dist/data:ro
|
||||||
profiles: [prod, prod-app, prod-worldserver]
|
profiles: [prod, prod-app, prod-worldserver]
|
||||||
depends_on:
|
depends_on:
|
||||||
@ -309,12 +322,18 @@ services:
|
|||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
env_file:
|
env_file:
|
||||||
${DOCKER_AC_ENV_FILE:-conf/dist/env.ac}
|
${DOCKER_AC_ENV_FILE:-conf/dist/env.ac}
|
||||||
|
environment:
|
||||||
|
AC_LOGS_DIR: "/azerothcore/env/dist/logs"
|
||||||
|
AC_TEMP_DIR: "/azerothcore/env/dist/temp"
|
||||||
|
AC_LOGIN_DATABASE_INFO: "ac-database;3306;root;password;acore_auth"
|
||||||
|
AC_SQLDRIVER_LOG_FILE: "SQLDriver.log"
|
||||||
|
AC_SQLDRIVER_QUERY_LOGGING: "1"
|
||||||
user: ${DOCKER_USER:-root}
|
user: ${DOCKER_USER:-root}
|
||||||
build:
|
build:
|
||||||
target: authserver
|
target: authserver
|
||||||
<<: *build-params
|
<<: *build-params
|
||||||
volumes:
|
volumes:
|
||||||
- ${DOCKER_VOL_LOGS:-./env/docker/logs}:/azerothcore/env/dist/logs:delegated
|
- ${DOCKER_VOL_LOGS:-./env/dist/logs}:/azerothcore/env/dist/logs:delegated
|
||||||
ports:
|
ports:
|
||||||
- ${DOCKER_AUTH_EXTERNAL_PORT:-3724}:3724
|
- ${DOCKER_AUTH_EXTERNAL_PORT:-3724}:3724
|
||||||
profiles: [prod, prod-app, prod-authserver]
|
profiles: [prod, prod-app, prod-authserver]
|
||||||
@ -324,7 +343,6 @@ services:
|
|||||||
ac-db-import-prod:
|
ac-db-import-prod:
|
||||||
condition: service_completed_successfully
|
condition: service_completed_successfully
|
||||||
|
|
||||||
|
|
||||||
ac-client-data-init:
|
ac-client-data-init:
|
||||||
image: acore/ac-wotlk-client-data:${DOCKER_IMAGE_TAG:-master} # name of the generated image after built locally
|
image: acore/ac-wotlk-client-data:${DOCKER_IMAGE_TAG:-master} # name of the generated image after built locally
|
||||||
user: ${DOCKER_USER:-root}
|
user: ${DOCKER_USER:-root}
|
||||||
@ -356,6 +374,13 @@ services:
|
|||||||
<<: *ac-shared-conf
|
<<: *ac-shared-conf
|
||||||
image: acore/ac-wotlk-worldserver:${DOCKER_IMAGE_TAG:-master} # name of the generated image after built locally
|
image: acore/ac-wotlk-worldserver:${DOCKER_IMAGE_TAG:-master} # name of the generated image after built locally
|
||||||
command: ./env/dist/bin/dbimport
|
command: ./env/dist/bin/dbimport
|
||||||
|
environment:
|
||||||
|
AC_DATA_DIR: "/azerothcore/env/dist/data"
|
||||||
|
AC_LOGS_DIR: "/azerothcore/env/dist/logs"
|
||||||
|
AC_LOGIN_DATABASE_INFO: "ac-database;3306;root;password;acore_auth"
|
||||||
|
AC_WORLD_DATABASE_INFO: "ac-database;3306;root;password;acore_world"
|
||||||
|
AC_CHARACTER_DATABASE_INFO: "ac-database;3306;root;password;acore_characters"
|
||||||
|
AC_CLOSE_IDLE_CONNECTIONS: "0"
|
||||||
profiles: [prod, prod-app, db-import-prod]
|
profiles: [prod, prod-app, db-import-prod]
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|||||||
0
env/docker/bin/.gitkeep
vendored
0
env/docker/bin/.gitkeep
vendored
0
env/docker/data/.gitkeep
vendored
0
env/docker/data/.gitkeep
vendored
0
env/docker/data/Cameras/.gitkeep
vendored
0
env/docker/data/Cameras/.gitkeep
vendored
0
env/docker/data/dbc/.gitkeep
vendored
0
env/docker/data/dbc/.gitkeep
vendored
0
env/docker/data/maps/.gitkeep
vendored
0
env/docker/data/maps/.gitkeep
vendored
0
env/docker/data/mmaps/.gitkeep
vendored
0
env/docker/data/mmaps/.gitkeep
vendored
0
env/docker/data/vmaps/.gitkeep
vendored
0
env/docker/data/vmaps/.gitkeep
vendored
0
env/docker/etc/.gitkeep
vendored
0
env/docker/etc/.gitkeep
vendored
22
env/docker/etc/authserver.conf.dockerdist
vendored
22
env/docker/etc/authserver.conf.dockerdist
vendored
@ -1,22 +0,0 @@
|
|||||||
###############################################
|
|
||||||
# AzerothCore Auth Server configuration file #
|
|
||||||
###############################################
|
|
||||||
[authserver]
|
|
||||||
|
|
||||||
# Do not change this
|
|
||||||
# Files in LogsDir will reflect on your host directory: docker/authserver/logs
|
|
||||||
LogsDir = "/azerothcore/env/dist/logs"
|
|
||||||
# Files in TempDir will reflect on your host directory: docker/authserver/temp
|
|
||||||
TempDir = "/azerothcore/env/dist/temp"
|
|
||||||
|
|
||||||
# Change this configuration accordingly with your docker setup
|
|
||||||
# The format is "hostname;port;username;password;database":
|
|
||||||
# - docker containers must be on the same docker network to be able to communicate
|
|
||||||
# - the DB hostname will be the name of the database docker container
|
|
||||||
LoginDatabaseInfo = "ac-database;3306;root;password;acore_auth"
|
|
||||||
|
|
||||||
# Add more configuration overwrites by copying settings from from authserver.conf.dist
|
|
||||||
|
|
||||||
SQLDriverLogFile = "SQLDriver.log"
|
|
||||||
SQLDriverQueryLogging = 1
|
|
||||||
|
|
||||||
18
env/docker/etc/dbimport.conf.dockerdist
vendored
18
env/docker/etc/dbimport.conf.dockerdist
vendored
@ -1,18 +0,0 @@
|
|||||||
# Do NOT change those Dir configs
|
|
||||||
# Files in LogsDir will reflect on your host directory: docker/worldserver/logs
|
|
||||||
LogsDir = "/azerothcore/env/dist/logs"
|
|
||||||
# Files in TempDir will reflect on your host directory: docker/authserver/temp
|
|
||||||
DataDir = "/azerothcore/env/dist/data"
|
|
||||||
|
|
||||||
# Change this configuration accordingly with your docker setup
|
|
||||||
# The format is "hostname;port;username;password;database":
|
|
||||||
# - docker containers must be on the same docker network to be able to communicate
|
|
||||||
# - the DB hostname will be the name of the database docker container
|
|
||||||
LoginDatabaseInfo = "ac-database;3306;root;password;acore_auth"
|
|
||||||
WorldDatabaseInfo = "ac-database;3306;root;password;acore_world"
|
|
||||||
CharacterDatabaseInfo = "ac-database;3306;root;password;acore_characters"
|
|
||||||
|
|
||||||
# Add more configuration overwrites by copying settings from worldserver.conf.dist
|
|
||||||
|
|
||||||
# Disable idle connections automatic kick since it doesn't work well on macOS + Docker
|
|
||||||
CloseIdleConnections = 0
|
|
||||||
23
env/docker/etc/worldserver.conf.dockerdist
vendored
23
env/docker/etc/worldserver.conf.dockerdist
vendored
@ -1,23 +0,0 @@
|
|||||||
################################################
|
|
||||||
# AzerothCore World Server configuration file #
|
|
||||||
################################################
|
|
||||||
[worldserver]
|
|
||||||
|
|
||||||
# Do NOT change those Dir configs
|
|
||||||
# Files in LogsDir will reflect on your host directory: docker/worldserver/logs
|
|
||||||
LogsDir = "/azerothcore/env/dist/logs"
|
|
||||||
# Files in TempDir will reflect on your host directory: docker/authserver/temp
|
|
||||||
DataDir = "/azerothcore/env/dist/data"
|
|
||||||
|
|
||||||
# Change this configuration accordingly with your docker setup
|
|
||||||
# The format is "hostname;port;username;password;database":
|
|
||||||
# - docker containers must be on the same docker network to be able to communicate
|
|
||||||
# - the DB hostname will be the name of the database docker container
|
|
||||||
LoginDatabaseInfo = "ac-database;3306;root;password;acore_auth"
|
|
||||||
WorldDatabaseInfo = "ac-database;3306;root;password;acore_world"
|
|
||||||
CharacterDatabaseInfo = "ac-database;3306;root;password;acore_characters"
|
|
||||||
|
|
||||||
# Add more configuration overwrites by copying settings from worldserver.conf.dist
|
|
||||||
|
|
||||||
# Disable idle connections automatic kick since it doesn't work well on macOS + Docker
|
|
||||||
CloseIdleConnections = 0
|
|
||||||
0
env/docker/logs/.gitkeep
vendored
0
env/docker/logs/.gitkeep
vendored
Loading…
x
Reference in New Issue
Block a user