forked from heygrady/docker-wordpress-starterkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
40 lines (37 loc) · 1 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
version: '2'
services:
wordpress:
build:
context: ./servers/wordpress/
dockerfile: Dockerfile
ports:
- "8080:80"
volumes:
# mount your bedrock site as /var/www
- ./bedrock/:/var/www/:rw
links:
- db:mysql
environment:
# TODO: how do these interact with the .env file? Seem to override it.
# TODO: WP_ENV: development|staging|production should `cp .env.${WP_ENV} .env`
DB_NAME: wordpress
DB_USER: root
DB_HOST: mysql:3306
DB_PASSWORD: pass
WP_HOME: http://localhost:8080
WP_SITEURL: http://localhost:8080/wp
db:
image: mariadb
ports:
- "3306:3306"
volumes:
# mount your sql backup files to be imported on server launch
- ./data/:/docker-entrypoint-initdb.d/
# mount mysql data files to a docker volume
- data:/var/log/mysql
environment:
#MYSQL_DATABASE: wordpress
MYSQL_ROOT_PASSWORD: pass
volumes:
#TODO: what precicely does this directive do?
data: {}