-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
152 lines (151 loc) · 5.3 KB
/
docker-compose.yml
File metadata and controls
152 lines (151 loc) · 5.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
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: