-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
92 lines (83 loc) · 2.73 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.3'
services:
adminer:
image: adminer
restart: always
environment:
- ADMINER_DEFAULT_SERVER=mysql
ports:
- 9000:8080
labels:
- 'traefik.backend=adminer'
- 'traefik.port=9000'
mysql:
image: mysql:5.7
restart: always
volumes:
- db_data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: wordpress
rsync:
user: sync
image: instrumentisto/rsync-ssh
volumes:
- ~/.ssh:/sbin/.ssh
- ./wp-content/uploads:/mnt
- ./.docker/wp-cli:/wp-cli
wordpress:
image: jerturowetz/wordpress
depends_on:
- mysql
restart: always
volumes:
- wordpress:/var/www/html
- ./wp-content/themes/${THEME_FOLDER:?THEME_FOLDER must be defined as an enviroment variable (or an .env file for sanity)}:/var/www/html/wp-content/themes/${THEME_FOLDER}
- ./wp-content/uploads:/var/www/html/wp-content/uploads
environment:
WORDPRESS_DB_PASSWORD: password
WORDPRESS_CONFIG_EXTRA: |
define( 'WP_CACHE', 0 );
define( 'WP_POST_REVISIONS', 0 );
define( 'WP_MEMORY_LIMIT', '128M' );
define( 'WP_MAX_MEMORY_LIMIT', '512M' );
define( 'WP_DEBUG', 1 );
define( 'WP_DEBUG_DISPLAY', 1 );
define( 'WP_DEBUG_LOG', 1 );
define( 'SCRIPT_DEBUG', 1 );
define( 'CONCATENATE_SCRIPTS', 0 );
define( 'JETPACK_DEV_DEBUG', 1 );
labels:
- "traefik.wordpress.backend=wordpress"
- "traefik.wordpress.port=80"
- "traefik.wordpress.frontend.rule=Host:${DEV_URL:?DEV_URL must be defined as an enviroment variable (or an .env file for sanity)}"
wp-cli:
image: wordpress:cli
user: '1000:1000'
volumes:
- wordpress:/var/www/html
- ./.docker/wp-cli:/var/www/html/.wp-cli
- ./wp-content/themes/${THEME_FOLDER:?THEME_FOLDER must be defined as an enviroment variable (or an .env file for sanity)}:/var/www/html/wp-content/themes/${THEME_FOLDER}
- ./wp-content/uploads:/var/www/html/wp-content/uploads
environment:
WORDPRESS_DB_PASSWORD: password
REPLACE_URL: "https://${PROD_URL:?PROD_URL must be defined as an enviroment variable (or an .env file for sanity)}"
WITH_URL: "http://${DEV_URL:?DEV_URL must be defined as an enviroment variable (or an .env file for sanity)}"
composer-plugins:
image: composer
user: '1000:1000'
volumes:
- wordpress:/app
- ./.docker/composer-plugins/plugins.json:/app/composer.json
command: composer install
traefik:
image: traefik
command: -c /dev/null --web --docker --logLevel=INFO
ports:
- 80:80
- 8080:8080
volumes:
- /var/run/docker.sock:/var/run/docker.sock
volumes:
db_data:
wordpress: