-
Notifications
You must be signed in to change notification settings - Fork 88
/
docker-compose.yml
46 lines (43 loc) · 1.24 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
version: '3'
services:
db:
image: mariadb
container_name: wordpress-mysql
restart: unless-stopped
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
volumes:
- ./wordpress-mysql/db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWD} # Requested, set the root's password of MySQL service.
- MYSQL_PASSWORD=${DB_PASSWD}
- MYSQL_DATABASE=wordpress
- MYSQL_USER=wordpress
- MYSQL_LOG_CONSOLE=true
networks:
- wordpress-net
labels:
# Watchtower Update
- "com.centurylinklabs.watchtower.enable=true"
wordpress:
image: wordpress:latest
container_name: wordpress
restart: unless-stopped
volumes:
- ./data:/var/www/html
networks:
- proxy
- wordpress-net
depends_on:
- db
labels:
- "traefik.enable=true"
- "traefik.http.routers.wordpress.rule=Host(`${TRAEFIK_WORDPRESS}`)"
- "traefik.http.routers.wordpress.entrypoints=https"
- "traefik.http.routers.wordpress.tls=true"
- "traefik.http.routers.wordpress.tls.certresolver=mydnschallenge"
# Watchtower Update
- "com.centurylinklabs.watchtower.enable=true"
networks:
wordpress-net:
proxy:
external: true