-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
74 lines (69 loc) · 1.8 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
74
version: "3"
volumes:
mysql:
driver: local
wordpress:
driver: local
services:
mysqlwp:
restart: always
image: mariadb:focal
container_name: mysqlwp
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW --innodb-file-per-table=1 --skip-innodb-read-only-compressed
env_file:
- .env
security_opt:
- no-new-privileges
networks:
- internal
environment:
- MYSQL_ROOT_PASSWORD=${ROOT_PASSWORD}
- MYSQL_PASSWORD=${PASSWORD}
- MYSQL_DATABASE=${DATABASE}
- MYSQL_USER=${USER}
volumes:
- /patch/to/data/wordpress/mysql:/var/lib/mysql
labels:
- "traefik.enable=false"
wpredis:
container_name: wpredis
image: redis
restart: unless-stopped
volumes:
- $HOME/miriboss/wordpress/redis:/data
networks:
- internal
blog:
image: wordpress:latest
container_name: wordpress
restart: always
env_file:
- .env
security_opt:
- no-new-privileges
networks:
- internal
- proxy
depends_on:
- mysqlwp
labels:
# wordpress
- "traefik.enable=true"
- "traefik.http.routers.wordpress.rule=Host(`${HOST_DOMAIN}`)"
- "traefik.http.routers.wordpress.entrypoints=websecure"
- "traefik.http.routers.wordpress.tls=true"
- "traefik.http.routers.wordpress.tls.certresolver=lets-encrypt"
- "traefik.http.services.wordpress.loadbalancer.server.port=80"
- "traefik.http.middlewares.wordpress.headers.sslredirect=true"
environment:
WORDPRESS_DB_PASSWORD: ${PASSWORD}
WORDPRESS_DB_HOST: mysqlwp:3306
WORDPRESS_DB_NAME: ${DATABASE}
WORDPRESS_DB_USER: ${USER}
volumes:
- /patch/to/data/wordpress:/var/www/html
networks:
proxy:
external: true
internal:
external: false