Created
August 26, 2024 23:33
-
-
Save Helias/c541edbef85d8992311e4ec049961920 to your computer and use it in GitHub Desktop.
acore-docker and acore-cms docker-compose.yml files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# acore-cms docker-compose.yml | |
version: '3.7' | |
services: | |
wp-db: | |
restart: unless-stopped | |
image: mysql:8 | |
command: 'mysqld --mysql-native-password=ON' | |
volumes: | |
- mysql-data:/var/lib/mysql | |
- ./data:/data/ | |
- ./apps:/apps/ | |
- ./conf:/conf/ | |
env_file: | |
# environment variables are retrieved by this file | |
# NOTE: you can add more variables to the .env file but | |
# you cannot override the .env.docker ones (by design) | |
- .env.docker | |
environment: | |
DOCKER_CONTAINER: 1 | |
MYSQL_ROOT_PASSWORD: flkdsjalfh | |
MYSQL_DATABASE: wordpress | |
MYSQL_USER: wordpress | |
MYSQL_PASSWORD: wordpress | |
networks: | |
- local-private-net | |
healthcheck: | |
test: mysqladmin ping -h 127.0.0.1 -u $$MYSQL_USER --password=$$MYSQL_PASSWORD | |
cap_add: | |
- SYS_NICE # CAP_SYS_NICE | |
php: | |
restart: unless-stopped | |
build: | |
context: . | |
dockerfile: data/docker/Wordpress.Dockerfile | |
args: | |
USER_ID: ${DOCKER_USER_ID:-1000} | |
GROUP_ID: ${DOCKER_GROUP_ID:-1000} | |
depends_on: | |
- wp-db | |
working_dir: "/var/www/html" | |
volumes: | |
- type: bind | |
source: ${DOCKER_CONF_PHP_PATH:-./conf/dist/php-conf/upload.ini} | |
target: /usr/local/etc/php/conf.d/upload.ini | |
- ./srv/wordpress:/var/www/html | |
env_file: | |
# environment variables are retrieved by this file | |
# NOTE: you can add more variables to the .env file but | |
# you cannot override the .env.docker ones (by design) | |
- .env.docker | |
environment: | |
DOCKER_CONTAINER: 1 | |
WORDPRESS_DB_HOST: wp-db:3306 | |
WORDPRESS_DB_USER: wordpress | |
WORDPRESS_DB_PASSWORD: wordpress | |
PHP_OPCACHE_VALIDATE_TIMESTAMPS: 1 | |
_OPCACHE_MAX_ACCELERATED_FILES: 100000 | |
PHP_OPCACHE_MEMORY_CONSUMPTION: 64 | |
PHP_OPCACHE_MAX_WASTED_PERCENTAGE: 5 | |
networks: | |
- local-private-net | |
- local-shared-net | |
web.local: | |
restart: unless-stopped | |
image: nginx | |
env_file: | |
# environment variables are retrieved by this file | |
# NOTE: you can add more variables to the .env file but | |
# you cannot override the .env.docker ones (by design) | |
- .env.docker | |
environment: | |
DOCKER_CONTAINER: 1 | |
depends_on: | |
- php | |
volumes: | |
- ${DOCKER_CONF_NGINX_PATH:-./conf/dist/nginx-conf}:/etc/nginx/conf.d/ | |
- ${DOCKER_CONF_CERTS_PATH:-./conf/dist/certs/}:/etc/nginx/certs/ | |
- ./srv/wordpress:/var/www/html | |
- ./var/logs:/var/log/nginx | |
extra_hosts: | |
- "web.local:127.0.0.1" | |
ports: | |
- ${DOCKER_HTTP_PORTS:-80:80} | |
- ${DOCKER_HTTPS_PORTS:-443:443} | |
expose: | |
- "80" | |
- "443" | |
networks: | |
- local-private-net | |
- local-shared-net | |
networks: | |
local-shared-net: | |
name: local-shared-net | |
driver: bridge | |
local-private-net: | |
driver: bridge | |
volumes: | |
mysql-data: | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# acore-docker docker-compose.yml | |
version: "3.9" | |
# extension field: https://docs.docker.com/compose/compose-file/compose-file-v3/#extension-fields | |
x-networks: &networks | |
networks: | |
- ac-network | |
- local-shared-net | |
x-ac-shared-conf: &ac-shared-conf | |
<<: *networks | |
working_dir: /azerothcore | |
depends_on: | |
ac-database: | |
condition: service_healthy | |
services: | |
ac-database: | |
<<: *networks | |
image: mysql:8.0 | |
restart: unless-stopped | |
cap_add: | |
- SYS_NICE # CAP_SYS_NICE | |
ports: | |
- ${DOCKER_DB_EXTERNAL_PORT:-63306}:3306 | |
expose: | |
- 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: 2s | |
timeout: 40s | |
retries: 20 | |
ac-worldserver: | |
container_name: acore-docker-ac-worldserver-1 # fixed container name to simplify the attach process | |
<<: *ac-shared-conf | |
stdin_open: true | |
tty: true | |
cap_add: | |
- SYS_NICE # CAP_SYS_NICE | |
image: acore/ac-wotlk-worldserver:${DOCKER_IMAGE_TAG:-12.0.0-dev.1} | |
restart: unless-stopped | |
privileged: true | |
user: ${DOCKER_USER:-acore} | |
ports: | |
- ${DOCKER_WORLD_EXTERNAL_PORT:-8085}:8085 | |
- ${DOCKER_SOAP_EXTERNAL_PORT:-7878}:7878 | |
expose: | |
- 8085 | |
volumes: | |
- ./scripts/lua:/azerothcore/env/dist/bin/lua_scripts/scripts | |
- "${DOCKER_VOL_CLIENT_DATA:-ac-client-data}:/azerothcore/env/dist/data:ro" | |
- ./conf/worldserver.conf:/azerothcore/env/dist/etc/worldserver.conf | |
environment: | |
AC_DATA_DIR: "/azerothcore/env/dist/data" | |
AC_LOGS_DIR: "/azerothcore/env/dist/logs" | |
AC_LOGIN_DATABASE_INFO: "ac-database;3306;root;${DOCKER_DB_ROOT_PASSWORD:-password};acore_auth" | |
AC_WORLD_DATABASE_INFO: "ac-database;3306;root;${DOCKER_DB_ROOT_PASSWORD:-password};acore_world" | |
AC_CHARACTER_DATABASE_INFO: "ac-database;3306;root;${DOCKER_DB_ROOT_PASSWORD:-password};acore_characters" | |
AC_CLOSE_IDLE_CONNECTIONS: "0" | |
depends_on: | |
ac-eluna-ts-dev: | |
condition: service_started | |
ac-client-data: | |
condition: service_completed_successfully | |
ac-db-import: | |
condition: service_completed_successfully | |
ac-authserver: | |
<<: *ac-shared-conf | |
tty: true | |
image: acore/ac-wotlk-authserver:${DOCKER_IMAGE_TAG:-12.0.0-dev.1} | |
restart: unless-stopped | |
ports: | |
- ${DOCKER_AUTH_EXTERNAL_PORT:-3724}:3724 | |
expose: | |
- 3724 | |
environment: | |
AC_LOGS_DIR: "/azerothcore/env/dist/logs" | |
AC_TEMP_DIR: "/azerothcore/env/dist/temp" | |
AC_LOGIN_DATABASE_INFO: "ac-database;3306;root;${DOCKER_DB_ROOT_PASSWORD:-password};acore_auth" | |
AC_SQLDRIVER_LOG_FILE: "SQLDriver.log" | |
AC_SQLDRIVER_QUERY_LOGGING: "1" | |
depends_on: | |
ac-database: | |
condition: service_healthy | |
ac-db-import: | |
condition: service_completed_successfully | |
ac-eluna-ts-dev: | |
image: acore/eluna-ts:master | |
# the build:lib is done in the healthcheck | |
command: sh -c "cd /eluna-ts/modules && touch index.ts && npm install && cd /eluna-ts && npm run dev" | |
# small workaround to make the other services to wait for the eluna-ts build | |
healthcheck: | |
test: sh -c "cd /eluna-ts/modules/eluna-ts && npm run build:lib && npm run build" | |
timeout: 60s | |
retries: 10 | |
interval: 5s | |
start_period: 10s | |
restart: unless-stopped | |
volumes: | |
# from typescript | |
- ./scripts/typescript:/eluna-ts/modules | |
# to lua | |
- ./scripts/lua:/eluna-ts/dist/ | |
ac-client-data: | |
<<: *networks | |
image: acore/ac-wotlk-client-data:${DOCKER_IMAGE_TAG:-12.0.0-dev.1} | |
volumes: | |
- "${DOCKER_VOL_CLIENT_DATA:-ac-client-data}:/azerothcore/env/dist/data" | |
ac-db-import: | |
<<: *ac-shared-conf | |
image: acore/ac-wotlk-db-import:${DOCKER_IMAGE_TAG:-12.0.0-dev.1} | |
environment: | |
AC_DISABLE_INTERACTIVE: "1" | |
AC_DATA_DIR: "/azerothcore/env/dist/data" | |
AC_LOGS_DIR: "/azerothcore/env/dist/logs" | |
AC_LOGIN_DATABASE_INFO: "ac-database;3306;root;${DOCKER_DB_ROOT_PASSWORD:-password};acore_auth" | |
AC_WORLD_DATABASE_INFO: "ac-database;3306;root;${DOCKER_DB_ROOT_PASSWORD:-password};acore_world" | |
AC_CHARACTER_DATABASE_INFO: "ac-database;3306;root;${DOCKER_DB_ROOT_PASSWORD:-password};acore_characters" | |
AC_CLOSE_IDLE_CONNECTIONS: "0" | |
depends_on: | |
ac-database: | |
condition: service_healthy | |
phpmyadmin: | |
<<: *networks | |
image: phpmyadmin | |
ports: | |
- 8080:80 | |
environment: | |
- PMA_ARBITRARY=1 | |
profiles: [] | |
volumes: | |
ac-database: | |
ac-client-data: | |
networks: | |
ac-network: | |
local-shared-net: | |
name: local-shared-net | |
driver: bridge |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment