forked from evertramos/docker-wordpress
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
49 lines (45 loc) · 1.3 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
version: '3'
services:
new-site-db:
container_name: ${CONTAINER_DB_NAME}
image: ${DB_IMAGE:-mariadb}:${DB_VERSION:-latest}
restart: unless-stopped
volumes:
- ${DB_FILES}:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
new-site-wordpress:
depends_on:
- new-site-db
container_name: ${CONTAINER_SITE_NAME}
image: ${SITE_IMAGE:-wordpress}:${SITE_VERSION:-latest}
restart: unless-stopped
volumes:
- ${SITE_FILES}:/var/www/html
- ./conf.d/php.ini:/usr/local/etc/php/conf.d/php.ini
environment:
WORDPRESS_DB_HOST: ${CONTAINER_DB_NAME}:3306
WORDPRESS_DB_NAME: ${MYSQL_DATABASE}
WORDPRESS_DB_USER: ${MYSQL_USER}
WORDPRESS_DB_PASSWORD: ${MYSQL_PASSWORD}
WORDPRESS_TABLE_PREFIX: ${WORDPRESS_TABLE_PREFIX}
VIRTUAL_HOST: ${DOMAINS}
LETSENCRYPT_HOST: ${DOMAINS}
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL}
logging:
options:
max-size: ${LOGGING_OPTIONS_MAX_SIZE:-200k}
wpcli:
image: tatemz/wp-cli
volumes:
- ${SITE_FILES}:/var/www/html
depends_on:
- new-site-db
entrypoint: wp
networks:
default:
external:
name: ${NETWORK}