Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
* text=auto eol=lf

*.sh text eol=lf

Dockerfile text eol=lf
Dockerfile.* text eol=lf
docker-compose*.yml text eol=lf
10 changes: 5 additions & 5 deletions apps/azerothcore/mysql-tools/build-dump-parser.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

gcc -O2 -Wall -pedantic dump-parser.c -o ./bin/dump-parser

read -p "done"
#!/bin/bash

gcc -O2 -Wall -pedantic dump-parser.c -o ./bin/dump-parser

read -p "done"
22 changes: 11 additions & 11 deletions apps/db_exporter/db_import.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/usr/bin/env bash
CURPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "$CURPATH/shared.sh"
for d in "$SQL_PATH/*/"" ; do
echo "Importing $d"
find "$SQL_PATH/$d/" -name '*.sql' | awk '{ print "source",$0 }' | mysql --batch -u "$MYSQL_USER" -p "$MYSQL_PASS" "$d" && echo "done"
done
#!/usr/bin/env bash

CURPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

source "$CURPATH/shared.sh"

for d in "$SQL_PATH/*/"" ; do
echo "Importing $d"
find "$SQL_PATH/$d/" -name '*.sql' | awk '{ print "source",$0 }' | mysql --batch -u "$MYSQL_USER" -p "$MYSQL_PASS" "$d" && echo "done"
done

304 changes: 152 additions & 152 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,152 +1,152 @@
services:
wp-db:
restart: unless-stopped
image: mysql:8
command: "mysqld --mysql-native-password=ON --binlog_expire_logs_seconds=259200"
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: ${DOCKER_WORDPRESS_DB_ROOT_PASSWORD:-flkdsjalfh}
MYSQL_DATABASE: ${DOCKER_WORDPRESS_DB_NAME:-wordpress}
MYSQL_USER: ${DOCKER_WORDPRESS_DB_USER:-wordpress}
MYSQL_PASSWORD: ${DOCKER_WORDPRESS_DB_PASSWORD:-wordpress}
networks:
- local-private-net
- ac-network
healthcheck:
test: mysqladmin ping -h 127.0.0.1 -u $$MYSQL_USER --password=$$MYSQL_PASSWORD
interval: 5s
timeout: 10s
retries: 30
cap_add:
- SYS_NICE # CAP_SYS_NICE
php:
restart: ${DOCKER_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:
condition: service_healthy
redis:
condition: service_started
volumes:
- type: bind
source: ${DOCKER_CONF_PHP_PATH:-./conf/dist/php-conf/upload.ini}
target: /usr/local/etc/php/conf.d/upload.ini
- ./src/acore-wp-plugin:/var/www/html/wp-content/plugins/acore-wp-plugins
- ${DOCKER_WORDPRESS_SRC_PATH:-wordpress-src}:/var/www/html
- ./apps:/usr/local/bin/apps
- ${DOCKER_CONF_INIT_PATH:-./conf/init}:/conf/init:ro
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
ENVIRONMENT: ${DOCKER_ENVIRONMENT:-production}
WORDPRESS_URL: ${DOCKER_WORDPRESS_URL:-http://localhost}
WORDPRESS_TITLE: ${DOCKER_WORDPRESS_TITLE:-ACoreCMS}
WORDPRESS_MULTISITE: ${DOCKER_WORDPRESS_MULTISITE:-true}
WORDPRESS_MULTISITE_USE_SUBDOMAINS: ${DOCKER_WORDPRESS_MULTISITE_USE_SUBDOMAINS:-false}
WORDPRESS_ADMIN_USER: ${DOCKER_WORDPRESS_ADMIN_USER:-admin}
WORDPRESS_ADMIN_PASSWORD: ${DOCKER_WORDPRESS_ADMIN_PASSWORD:-admin}
WORDPRESS_ADMIN_EMAIL: ${DOCKER_WORDPRESS_ADMIN_EMAIL:-admin@example.com}
WORDPRESS_DB_HOST: wp-db:3306
WORDPRESS_DB_USER: ${DOCKER_WORDPRESS_DB_USER:-wordpress}
WORDPRESS_DB_PASSWORD: ${DOCKER_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
DOCKER_USER_ID: ${DOCKER_USER_ID:-1000}
DOCKER_GROUP_ID: ${DOCKER_GROUP_ID:-1000}
networks:
- local-private-net
- ac-network
# allow the container to access the host machine
# this is useful for development purposes, e.g. to access the database/AC server running on the host
extra_hosts:
- "host.docker.internal:host-gateway"
healthcheck:
test: ["CMD", "/usr/local/bin/apps/init/healthcheck.sh"]
interval: 5s
timeout: 10s
retries: 30
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:
condition: service_healthy
volumes:
- ${DOCKER_CONF_NGINX_PATH:-./conf/dist/nginx-conf}:/etc/nginx/conf.d/
- ${DOCKER_CONF_CERTS_PATH:-./conf/dist/certs/}:/etc/nginx/certs/
- ${DOCKER_CONF_CERTS_PATH:-./data/plugins/}:/tmp/plugins
- ./var/logs:/var/log/nginx
- ${DOCKER_WORDPRESS_SRC_PATH:-wordpress-src}:/var/www/html:ro
- ./src/acore-wp-plugin:/var/www/html/wp-content/plugins/acore-wp-plugins
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
- ac-network
redis:
image: redis:alpine
networks:
- local-private-net
expose:
- "6379"
acore-cms-maintenance:
image: nginx
environment:
DOCKER_CONTAINER: 1
MAINTENANCE_MODE: "true"
volumes:
- ${DOCKER_CONF_CERTS_PATH:-./conf/dist/certs/}:/etc/nginx/certs/
- ${DOCKER_CONF_NGINX_MAINTENANCE_CONF:-./conf/dist/maintenance/conf}:/etc/nginx/conf.d/
- ${DOCKER_CONF_NGINX_MAINTENANCE_HTML:-./conf/dist/maintenance/html}:/var/www/html
ports:
- ${DOCKER_HTTP_PORTS:-80:80}
- ${DOCKER_HTTPS_PORTS:-443:443}
profiles: [maintenance]
networks:
local-shared-net:
name: local-shared-net
driver: bridge
local-private-net:
driver: bridge
ac-network:
name: ${DOCKER_AC_NETWORK_NAME:-azerothcore-wotlk_ac-network} # default network name if you use the docker setup of ac
external: ${DOCKER_AC_NETWORK_EXTERNAL:-false}
volumes:
mysql-data:
wordpress-src:
services:
wp-db:
restart: unless-stopped
image: mysql:8
command: "mysqld --mysql-native-password=ON --binlog_expire_logs_seconds=259200"
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: ${DOCKER_WORDPRESS_DB_ROOT_PASSWORD:-flkdsjalfh}
MYSQL_DATABASE: ${DOCKER_WORDPRESS_DB_NAME:-wordpress}
MYSQL_USER: ${DOCKER_WORDPRESS_DB_USER:-wordpress}
MYSQL_PASSWORD: ${DOCKER_WORDPRESS_DB_PASSWORD:-wordpress}
networks:
- local-private-net
- ac-network
healthcheck:
test: mysqladmin ping -h 127.0.0.1 -u $$MYSQL_USER --password=$$MYSQL_PASSWORD
interval: 5s
timeout: 10s
retries: 30
cap_add:
- SYS_NICE # CAP_SYS_NICE
php:
restart: ${DOCKER_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:
condition: service_healthy
redis:
condition: service_started
volumes:
- type: bind
source: ${DOCKER_CONF_PHP_PATH:-./conf/dist/php-conf/upload.ini}
target: /usr/local/etc/php/conf.d/upload.ini
- ./src/acore-wp-plugin:/var/www/html/wp-content/plugins/acore-wp-plugins
- ${DOCKER_WORDPRESS_SRC_PATH:-wordpress-src}:/var/www/html
- ./apps:/usr/local/bin/apps
- ${DOCKER_CONF_INIT_PATH:-./conf/init}:/conf/init:ro
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
ENVIRONMENT: ${DOCKER_ENVIRONMENT:-production}
WORDPRESS_URL: ${DOCKER_WORDPRESS_URL:-http://localhost}
WORDPRESS_TITLE: ${DOCKER_WORDPRESS_TITLE:-ACoreCMS}
WORDPRESS_MULTISITE: ${DOCKER_WORDPRESS_MULTISITE:-true}
WORDPRESS_MULTISITE_USE_SUBDOMAINS: ${DOCKER_WORDPRESS_MULTISITE_USE_SUBDOMAINS:-false}
WORDPRESS_ADMIN_USER: ${DOCKER_WORDPRESS_ADMIN_USER:-admin}
WORDPRESS_ADMIN_PASSWORD: ${DOCKER_WORDPRESS_ADMIN_PASSWORD:-admin}
WORDPRESS_ADMIN_EMAIL: ${DOCKER_WORDPRESS_ADMIN_EMAIL:-admin@example.com}
WORDPRESS_DB_HOST: wp-db:3306
WORDPRESS_DB_USER: ${DOCKER_WORDPRESS_DB_USER:-wordpress}
WORDPRESS_DB_PASSWORD: ${DOCKER_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
DOCKER_USER_ID: ${DOCKER_USER_ID:-1000}
DOCKER_GROUP_ID: ${DOCKER_GROUP_ID:-1000}
networks:
- local-private-net
- ac-network
# allow the container to access the host machine
# this is useful for development purposes, e.g. to access the database/AC server running on the host
extra_hosts:
- "host.docker.internal:host-gateway"
healthcheck:
test: ["CMD", "/usr/local/bin/apps/init/healthcheck.sh"]
interval: 5s
timeout: 10s
retries: 30
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:
condition: service_healthy
volumes:
- ${DOCKER_CONF_NGINX_PATH:-./conf/dist/nginx-conf}:/etc/nginx/conf.d/
- ${DOCKER_CONF_CERTS_PATH:-./conf/dist/certs/}:/etc/nginx/certs/
- ${DOCKER_CONF_CERTS_PATH:-./data/plugins/}:/tmp/plugins
- ./var/logs:/var/log/nginx
- ${DOCKER_WORDPRESS_SRC_PATH:-wordpress-src}:/var/www/html:ro
- ./src/acore-wp-plugin:/var/www/html/wp-content/plugins/acore-wp-plugins
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
- ac-network
redis:
image: redis:alpine
networks:
- local-private-net
expose:
- "6379"
acore-cms-maintenance:
image: nginx
environment:
DOCKER_CONTAINER: 1
MAINTENANCE_MODE: "true"
volumes:
- ${DOCKER_CONF_CERTS_PATH:-./conf/dist/certs/}:/etc/nginx/certs/
- ${DOCKER_CONF_NGINX_MAINTENANCE_CONF:-./conf/dist/maintenance/conf}:/etc/nginx/conf.d/
- ${DOCKER_CONF_NGINX_MAINTENANCE_HTML:-./conf/dist/maintenance/html}:/var/www/html
ports:
- ${DOCKER_HTTP_PORTS:-80:80}
- ${DOCKER_HTTPS_PORTS:-443:443}
profiles: [maintenance]

networks:
local-shared-net:
name: local-shared-net
driver: bridge
local-private-net:
driver: bridge
ac-network:
name: ${DOCKER_AC_NETWORK_NAME:-azerothcore-wotlk_ac-network} # default network name if you use the docker setup of ac
external: ${DOCKER_AC_NETWORK_EXTERNAL:-false}
volumes:
mysql-data:
wordpress-src:
Loading
Loading