-
-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathdocker-compose.j2
63 lines (58 loc) · 1.49 KB
/
docker-compose.j2
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
version: '2.1'
services:
https-portal:
image: steveltn/https-portal:1
container_name: https
volumes:
- ./logs/nginx:/var/log/nginx
ports:
- '80:80'
- '443:443'
environment:
CLIENT_MAX_BODY_SIZE: '100M'
GZIP: 'on'
DOMAINS: '{{ domain }} -> http://wordpress:80'
STAGE: '{{ stage }}'
restart: unless-stopped
networks:
- wp
wordpress:
depends_on:
db:
condition: service_healthy
# ToDo: implement option of using different version
image: wordpress:{{ wp_version }}-apache
container_name: wp
volumes:
- ./wordpress:/var/www/html
- ./wordpress/uploads.ini:/usr/local/etc/php/conf.d/uploads.ini
environment:
WORDPRESS_DB_USER: '{{ wp_db_user }}'
WORDPRESS_DB_NAME: '{{ wp_db_name }}'
WORDPRESS_DB_PASSWORD: '{{ wp_db_psw }}'
WORDPRESS_DB_HOST: 'db'
MYSQL_PORT_3306_TCP: '3306'
restart: unless-stopped
networks:
- wp
db:
image: mysql:5.7
container_name: db
volumes:
- ./wp-db-data:/var/lib/mysql
healthcheck:
test: "/usr/bin/mysql --user=root --password='{{ wp_db_psw }}' --execute \"SHOW DATABASES;\""
interval: 2s
timeout: 20s
retries: 10
environment:
MYSQL_ROOT_PASSWORD: '{{ db_root_psw }}'
MYSQL_DATABASE: '{{ wp_db_name }}'
MYSQL_USER: '{{ wp_db_user }}'
MYSQL_PASSWORD: '{{ wp_db_psw }}'
restart: unless-stopped
networks:
- wp
networks:
wp:
driver: bridge