-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
41 lines (37 loc) · 1007 Bytes
/
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
version: '3.7'
services:
database:
container_name: ${CONTAINER_PREFIX}_database
image: mariadb:latest
env_file: ./.env
restart: always
volumes:
- ./database:/var/lib/mysql
wordpress:
container_name: ${CONTAINER_PREFIX}_wordpress
image: wordpress:fpm
env_file: ./.env
restart: always
depends_on:
- database
volumes:
- ./webroot:/var/www/html
# Mount WordPress theme
# - /absolute/path/to/your/theme:/var/www/html/wp-content/themes/theme-name
webserver:
container_name: ${CONTAINER_PREFIX}_webserver
image: nginx:latest
env_file: ./.env
restart: always
depends_on:
- wordpress
ports:
- "80:80"
- "443:443"
volumes:
- ./webroot:/var/www/html
- ./nginx-config:/etc/nginx/conf.d
- ./nginx-logs:/var/log/nginx
- ./letsencrypt:/etc/letsencrypt
# Mount WordPress theme
# - /absolute/path/to/your/theme:/var/www/html/wp-content/themes/theme-name