-
Notifications
You must be signed in to change notification settings - Fork 156
/
docker-compose.yml
93 lines (87 loc) · 3.66 KB
/
docker-compose.yml
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
version: '3'
services:
docker-wordpress-new-db:
image: ${DOCKER_WORDPRESS_DB_IMAGE:-mysql}:${DOCKER_WORDPRESS_DB_VERSION:-latest}
container_name: ${DOCKER_WORDPRESS_DB_CONTAINER_NAME}
restart: unless-stopped
deploy:
resources:
limits:
cpus: ${DOCKER_WORDPRESS_MYSQL_CPU_LIMIT:-'0.5'}
memory: ${DOCKER_WORDPRESS_MYSQL_MEMORY_LIMIT:-300M}
networks:
- docker-wordpress-db-net
volumes:
- ${DOCKER_WORDPRESS_DB_FILES}:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: ${DOCKER_WORDPRESS_MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${DOCKER_WORDPRESS_MYSQL_DATABASE}
MYSQL_USER: ${DOCKER_WORDPRESS_MYSQL_USER}
MYSQL_PASSWORD: ${DOCKER_WORDPRESS_MYSQL_PASSWORD}
logging:
driver: ${DOCKER_WORDPRESS_DB_LOG_DRIVER:-json-file}
options:
max-size: ${DOCKER_WORDPRESS_DB_LOG_MAX_SIZE:-1m}
max-file: ${DOCKER_WORDPRESS_DB_LOG_MAX_FILE:-10}
docker-wordpress-new-site:
depends_on:
- docker-wordpress-new-db
image: ${DOCKER_WORDPRESS_SITE_IMAGE:-wordpress}:${DOCKER_WORDPRESS_SITE_VERSION:-latest}
container_name: ${DOCKER_WORDPRESS_SITE_CONTAINER_NAME}
restart: unless-stopped
deploy:
resources:
limits:
cpus: ${DOCKER_WORDPRESS_SITE_CPU_LIMIT:-'0.5'}
memory: ${DOCKER_WORDPRESS_SITE_MEMORY_LIMIT:-300M}
networks:
- docker-wordpress-proxy-network
- docker-wordpress-db-net
volumes:
- ${DOCKER_WORDPRESS_SITE_FILES}:/var/www/html
- ./conf.d/php.ini:/usr/local/etc/php/conf.d/php.ini
environment:
WORDPRESS_DB_HOST: ${DOCKER_WORDPRESS_DB_HOST:-docker-wordpress-new-db}:3306
WORDPRESS_DB_NAME: ${DOCKER_WORDPRESS_MYSQL_DATABASE}
WORDPRESS_DB_USER: ${DOCKER_WORDPRESS_MYSQL_USER}
WORDPRESS_DB_PASSWORD: ${DOCKER_WORDPRESS_MYSQL_PASSWORD}
WORDPRESS_TABLE_PREFIX: ${DOCKER_WORDPRESS_TABLE_PREFIX}
VIRTUAL_HOST: ${DOCKER_WORDPRESS_DOMAINS}
# VIRTUAL_PATH: ${DOCKER_WORDPRESS_VIRTUAL_PATH:-"/"}
# VIRTUAL_DEST: ${DOCKER_WORDPRESS_VIRTUAL_DEST:-"/"}
LETSENCRYPT_HOST: ${DOCKER_WORDPRESS_DOMAINS}
LETSENCRYPT_EMAIL: ${DOCKER_WORDPRESS_LETSENCRYPT_EMAIL}
# WORDPRESS_AUTH_KEY: ${DOCKER_WORDPRESS_AUTH_KEY:-null}
# WORDPRESS_SECURE_AUTH_KEY: ${DOCKER_WORDPRESS_SECURE_AUTH_KEY:-null}
# WORDPRESS_LOGGED_IN_KEY: ${DOCKER_WORDPRESS_LOGGED_IN_KEY:-null}
# WORDPRESS_NONCE_KEY: ${DOCKER_WORDPRESS_NONCE_KEY:-null}
# WORDPRESS_AUTH_SALT: ${DOCKER_WORDPRESS_AUTH_SALT:-null}
# WORDPRESS_SECURE_AUTH_SALT: ${DOCKER_WORDPRESS_SECURE_AUTH_SALT:-null}
# WORDPRESS_LOGGED_IN_SALT: ${DOCKER_WORDPRESS_LOGGED_IN_SALT:-null}
# WORDPRESS_NONCE_SALT: ${DOCKER_WORDPRESS_NONCE_SALT:-null}
# WORDPRESS_DEBUG: ${DOCKER_WORDPRESS_DEBUG:-null}
# WORDPRESS_CONFIG_EXTRA: ${DOCKER_WORDPRESS_CONFIG_EXTRA:-null}
logging:
driver: ${DOCKER_WORDPRESS_SITE_LOG_DRIVER:-json-file}
options:
max-size: ${DOCKER_WORDPRESS_SITE_LOG_MAX_SIZE:-2m}
max-file: ${DOCKER_WORDPRESS_SITE_LOG_MAX_FILE:-10}
wpcli:
image: wordpress:cli
environment:
WORDPRESS_DB_HOST: ${DOCKER_WORDPRESS_DB_HOST:-docker-wordpress-new-db}:3306
WORDPRESS_DB_NAME: ${DOCKER_WORDPRESS_MYSQL_DATABASE}
WORDPRESS_DB_USER: ${DOCKER_WORDPRESS_MYSQL_USER}
WORDPRESS_DB_PASSWORD: ${DOCKER_WORDPRESS_MYSQL_PASSWORD}
WORDPRESS_TABLE_PREFIX: ${DOCKER_WORDPRESS_TABLE_PREFIX}
networks:
- docker-wordpress-db-net
volumes:
- ${DOCKER_WORDPRESS_SITE_FILES}:/var/www/html
depends_on:
- docker-wordpress-new-db
entrypoint: wp
networks:
docker-wordpress-proxy-network:
external: true
docker-wordpress-db-net: