-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
58 lines (58 loc) · 1.54 KB
/
docker-compose.yaml
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
version: '3.9'
services:
wp-db:
container_name: wp-db
image: mysql:latest
command: [ "--default-authentication-plugin=mysql_native_password" ]
environment:
MYSQL_ROOT_PASSWORD: wp-dev
MYSQL_DATABASE: wp-dev
MYSQL_USER: wp-dev
MYSQL_PASSWORD: wp-dev
ports:
- '3306:3306'
volumes:
- './data/wp_db:/var/lib/mysql'
wp:
container_name: wp
image: wordpress:latest
restart: always
depends_on:
- wp-db
ports:
- '80:80'
environment:
- WORDPRESS_DB_PASSWORD=${MYSQL_PASSWORD}
- WORDPRESS_DB_USER=${MYSQL_USER}
- WORDPRESS_DB_NAME=${MYSQL_DATABASE}
- WORDPRESS_DB_HOST=wp-db
volumes:
- './data/wp_html:/var/www/html'
- './wbl_breweries:/var/www/html/wp-content/plugins/wbl_breweries'
wp-cli:
container_name: wp-cli
image: wordpress:cli
profiles:
- auto-config
depends_on:
- wp
- wp-db
volumes:
- './data/wp_html:/var/www/html'
- './wbl_breweries:/var/www/html/wp-content/plugins/wbl_breweries'
- './scripts/wait-for-mysql.sh:/wait-for-mysql.sh'
command: >
/wait-for-mysql.sh
wp core install
--path="/var/www/html"
--url="http://localhost"
--title='${WP_TITLE}'
--admin_user="${WP_ADMIN_USER}"
--admin_password="${WP_ADMIN_PASSWORD}"
--admin_email="${WP_ADMIN_EMAIL}"
--skip-email
environment:
- WORDPRESS_DB_PASSWORD=wp-dev
- WORDPRESS_DB_USER=wp-dev
- WORDPRESS_DB_NAME=wp-dev
- WORDPRESS_DB_HOST=wp-db