forked from luangjokaj/wordpressify
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
79 lines (75 loc) · 2.24 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
version: '3.4'
services:
db:
image: mariadb
environment:
MYSQL_ROOT_PASSWORD: 'root'
MYSQL_DATABASE: 'wordpress'
volumes:
- 'persistent_db:/var/lib/mysql'
ports:
- '3306:3306'
wordpress:
build:
dockerfile: ./Dockerfile-wordpress
context: .
expose:
- '9000'
environment:
WORDPRESS_DB_HOST: 'db'
WORDPRESS_DB_USER: 'root'
WORDPRESS_DB_PASSWORD: 'root'
WORDPRESS_DB_NAME: 'wordpress'
WORDPRESS_DEBUG: 1
WORDPRESS_CONFIG_EXTRA: |
define( 'DISABLE_WP_CRON', true );
define( 'WP_DEBUG_LOG', '/var/xdebug/wp-errors.log' );
define( 'FS_DIRECT', true );
volumes:
- './build/wordpress:/var/www/html'
- './xdebug:/var/xdebug'
- './config/php.ini:/usr/local/etc/php/conf.d/overrides.ini'
depends_on:
- db
wordpress-chmod:
image: wordpress:5-php7.4-fpm
restart: on-failure
depends_on:
- wordpress
volumes:
- './build/wordpress:/var/www/html'
entrypoint: >
/bin/sh -c "
chmod -R 777 wp-content/themes;
chmod -R 777 wp-content/plugins;
exit 0;
"
webserver:
image: nginx:alpine
ports:
- '8080:8080'
volumes:
- ./config/nginx/nginx.conf:/etc/nginx/conf.d/nginx.conf:ro
- './build/wordpress:/var/www/html'
depends_on:
- wordpress-chmod
nodejs:
build:
dockerfile: ./Dockerfile-nodejs
context: .
ports:
- '3001:3001' # Default port for browserSync UI (for debugging)
- '${PROXY_PORT:-3010}:${PROXY_PORT:-3010}'
environment:
- PROXY_PORT=${PROXY_PORT:-3010}
- THEME_NAME=${THEME_NAME}
volumes:
- './src:/usr/src/app/src'
- './dist:/usr/src/app/dist'
- './build:/usr/src/app/build'
- './backups:/usr/src/app/backups'
depends_on:
- 'webserver'
command: npm run dev
volumes:
persistent_db: