-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yaml
45 lines (40 loc) · 1.02 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
version: '3'
services:
mysql:
image: mysql:5
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: password
MYSQL_ROOT_PASSWORD: password
wordpress:
image: wordpress:latest
links:
- mysql:mysql
depends_on:
- mysql
ports:
- "80:80"
- "443:443"
volumes:
- wp_data:/var/www/html
- ".:/var/www/html/wp-content/plugins/block-context:ro" # Without "ro" flags it can't access the directory.
restart: always
environment:
WORDPRESS_DEBUG: 1
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: password
wpcli:
image: wordpress:cli
depends_on:
- mysql
- wordpress
volumes:
- wp_data:/var/www/html
command: wp core install --url=blockcontext.local --title="Block Context" --admin_user=admin --admin_password=password [email protected] --path=/var/www/html
volumes:
db_data: {}
wp_data: {}