-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
66 lines (60 loc) · 1.76 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
version: "3.7"
services:
db:
image: mariadb:10.2
volumes:
- db-data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_USER: wordpress
MYSQL_PASSWORD: password
MYSQL_DATABASE: wordpress
wordpress:
image: ziodave/wordpress-xdebug:5.8.3-php8.0
depends_on:
- db
ports:
- "80:80"
volumes:
- wordpress-data:/var/www/html
- .:/var/www/html/wp-content/plugins/wp-all-import-wordlift-add-on
- .docker/php/custom.ini:/usr/local/etc/php/conf.d/custom.ini
env_file:
- ./.env
environment:
PHP_IDE_CONFIG: serverName=wordpress-nginx
WORDPRESS_DB_HOST: db
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: password
WORDPRESS_DB_NAME: wordpress
WORDPRESS_TABLE_PREFIX: wp_
WORDPRESS_DEBUG: "1"
WORDPRESS_CONFIG_EXTRA: |
if ( isset( $$_SERVER['HTTP_X_FORWARDED_HOST'] ) ) {
$$_SERVER['HTTP_HOST'] = $$_SERVER['HTTP_X_FORWARDED_HOST'];
}
# Define the site and home URLs.
define( 'WP_SITEURL', 'https://wordlift-addon.www.localhost' );
define( 'WP_HOME', WP_SITEURL );
nginx:
depends_on:
- wordpress
image: nginx:1.21.5
ports:
- "443:443"
volumes:
- ./.docker/nginx/conf.d:/etc/nginx/conf.d
- .:/var/www/html/wp-content/plugins/wp-all-import-wordlift-add-on
environment:
NGINX_HOST_NAME: "${COMPOSE_PROJECT_NAME}"
command: /bin/bash -c "envsubst '$$NGINX_HOST_NAME' < /etc/nginx/conf.d/wordpress.template > /etc/nginx/conf.d/wordpress.conf && nginx -g 'daemon off;'"
cli:
image: wordpress:cli-2.5-php8.0
depends_on:
- db
user: xfs
volumes:
- .:/var/www/html
volumes:
db-data:
wordpress-data: