-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
73 lines (68 loc) · 1.36 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
67
68
69
70
71
72
73
version: '2.1'
services:
database:
# name: mariadb
build:
dockerfile: ./Dockerfile
context: ./maria/
image: wp-mariadb
volumes:
- ./data-db:/var/lib/mysql
expose:
- "3306"
restart: always
environment:
- MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}
- MYSQL_DATABASE=${DB_NAME}
- MYSQL_USER=${DB_USER}
- MYSQL_PASSWORD=${DB_PASSWORD}
php:
# name: phpfpm
build:
dockerfile: ./Dockerfile
context: ./php/
image: wp-phpfpm
depends_on:
- database
volumes:
- ./data-wp:/var/www
expose:
- "9000"
restart: always
environment:
- DB_HOST
- DB_USER
- DB_PASSWORD
- DB_NAME
- DB_ROOT_PASSWORD
- DB_TABLE_PREFIX
- WP_DEBUG
- WP_ALLOW_MULTISITE
- WP_AUTH_KEY
- WP_SECURE_AUTH_KEY
- WP_LOGGED_IN_KEY
- WP_NONCE_KEY
- WP_AUTH_SALT
- WP_SECURE_AUTH_SALT
- WP_LOGGED_IN_SALT
- WP_NONCE_SALT
web:
# name: nginx
build:
dockerfile: ./Dockerfile
context: ./nginx/
image: wp-nginx
depends_on:
- php
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
ports:
- "${WEB_PORT}:80"
volumes_from:
- php
restart: always
# volumes:
# database:
# volume_driver: local
# content:
# volume_driver: local