-
Notifications
You must be signed in to change notification settings - Fork 0
/
2-docker-compose.yaml
90 lines (76 loc) · 2.27 KB
/
2-docker-compose.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
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# This is one of your sites.
version: '2.4'
services:
4soulsband_wordpress:
container_name: 4soulsband_wordpress
image: wordpress:php8.0
cpu_quota: 10000 # 1000 = 1%
mem_reservation: 256M
restart: always
depends_on:
- 4soulsband_mysql_db
env_file: deploy_configs/env_vars/4soulsband_wordpress.env
volumes:
- ./4soulsband_wordpress:/var/www/html
- ./deploy_configs/env_vars/4soulsband_wordpress.ini:/var/www/html/php.ini
labels:
- traefik.http.routers.4soulsband_wordpress.rule=Host(`xn--4-htbm7bza.xn--p1ai`)
- traefik.http.routers.4soulsband_wordpress.tls.certresolver=${CASERVER}
- traefik.http.services.4soulsband_wordpress.loadbalancer.server.port=80
- traefik.docker.network=traefik_proxy_net
- traefik.enable=true
- traefik.http.routers.4soulsband_wordpress.entrypoints=http,https
- traefik.http.routers.4soulsband_wordpress.tls=true
networks:
traefik_proxy_net:
4soulsband_net:
4soulsband_mysql_db:
container_name: 4soulsband_mysql_db
image: mysql/mysql-server:8.0
cpu_quota: 10000 # 1000 = 1%
mem_reservation: 512M
restart: always
ports:
- "3316:3306"
command: --default-authentication-plugin=mysql_native_password
env_file: ./deploy_configs/env_vars/4soulsband_wordpress.env
volumes:
- ./4soulsband_mysql_db:/var/lib/mysql
networks:
4soulsband_net:
traefik_proxy_net: # To get access to a db by domain name.
redis:
image: redis:6.0.15-alpine
container_name: redis
cpu_quota: 20000 # 1000 = 1%
mem_reservation: 512M
restart: always
command: --port 6380
entrypoint: redis-server --maxmemory 512mb --maxmemory-policy allkeys-lru
security_opt:
- no-new-privileges:true
logging:
options:
max-size: "10m"
max-file: "3"
volumes:
- redis_data:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
networks:
4soulsband_net:
networks:
4soulsband_net:
driver: bridge
driver_opts:
com.docker.network.enable_ipv6: "false"
ipam:
driver: default
config:
- subnet: 172.16.193.0/24
traefik_proxy_net:
external: true
redis_net:
external: true
volumes:
redis_data: