-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.dev.yaml
executable file
·47 lines (44 loc) · 1.34 KB
/
docker-compose.dev.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
version: '3.8'
services:
wp:
build:
context: .
dockerfile: Dockerfile.dev
container_name: ${THEME_NAME}__wp__dev
restart: on-failure
stdin_open: true
ports:
- 80:80
environment:
WORDPRESS_DB_HOST: db
WORDPRESS_DB_USER: ${DB_USER}
WORDPRESS_DB_NAME: ${DB_NAME}
WORDPRESS_DB_PASSWORD: ${DB_PASS}
depends_on:
- db
volumes:
# These shall be copied by the dockerfile
- ./config/wp/apache/apache.conf:/etc/apache2/sites-enabled/000-default.conf
- ./config/wp/uploads/uploads.ini:/usr/local/etc/php/conf.d/uploads.ini
- ./plugins:/var/www/html/wp-content/plugins
# The theme requires building and then copying by the dockerfile
- ./theme:/var/www/html/wp-content/themes/${THEME_NAME}
# These shall come from persistent storage in production
- ./uploads:/var/www/html/wp-content/uploads
# standalone access to scripts inside the container
- ./scripts/wp:/scripts
db:
image: mysql:5.7
container_name: ${THEME_NAME}__db__dev
restart: on-failure
environment:
MYSQL_DATABASE: ${DB_NAME}
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASS}
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASS}
volumes:
- db:/var/lib/mysql
- ./backups/sql:/backups/sql
- ./scripts/db:/scripts
volumes:
db: