-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
152 lines (152 loc) · 4.18 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
---
networks:
t2:
name: t2
driver: bridge
ipam:
config:
- subnet: 192.168.90.0/24
default:
driver: bridge
socket_proxy:
name: socket_proxy
driver: bridge
ipam:
config:
- subnet: 192.168.91.0/24
secrets:
do_token:
file: $SECRETSDIR/do_token
mariadb_root_password:
file: $SECRETSDIR/mariadb_root_password
mariadb_password:
file: $SECRETSDIR/mariadb_password
mariadb_database:
file: $SECRETSDIR/mariadb_database
mariadb_user:
file: $SECRETSDIR/mariadb_user
services:
docker-proxy:
restart: unless-stopped
image: tecnativa/docker-socket-proxy
ports:
- 127.0.0.1:2375:2375
networks:
socket_proxy:
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- LOG_LEVEL=info
- EVENTS=1
- PING=1
- VERSION=1
- AUTH=0
- SECRETS=0
- POST=1
- BUILD=0
- COMMIT=0
- CONFIGS=0
- CONTAINERS=1
- DISTRIBUTION=0
- EXEC=0
- IMAGES=1
- INFO=1
- NETWORKS=1
- NODES=0
- PLUGINS=0
- SERVICES=1
- SESSION=0
- SWARM=0
- SYSTEM=0
- TASKS=1
- VOLUMES=1
traefik:
restart: unless-stopped
depends_on:
- docker-proxy
image: traefik
networks:
t2:
socket_proxy:
ports:
- 80:80
- 443:443
volumes:
- $DOCKERDIR/traefik/rules:/rules
- $DOCKERDIR/traefik/traefik.yml:/traefik.yml
- $DOCKERDIR/letsencrypt/acme.json:/etc/letsencrypt/acme.json
- /var/log/traefik:/logs/
environment:
- TZ=$TZ
- DO_AUTH_TOKEN_FILE=/run/secrets/do_token
command:
- --configFile=/traefik.yml
- --certificatesresolvers.prime-resolver.acme.email=$LE_EMAIL
secrets:
- do_token
nginx:
restart: unless-stopped
image: nginx
depends_on:
- php
container_name: nginx
networks:
t2:
ipv4_address: 192.168.90.5
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- /var/log/nginx:/var/log/nginx
- $DOCKERDIR/nginx:/etc/nginx
- $WWWDIR/renderbus.statbus.space:/var/www/html/renderbus.statbus.space
- $WWWDIR/gallery.statbus.space:/var/www/html/gallery.statbus.space
- $WWWDIR/matomo.statbus.space:/var/www/html/matomo.statbus.space
- $WWWDIR/badger.statbus.space:/var/www/html/badger.statbus.space
- $WWWDIR/tgmc.statbus.space:/var/www/html/tgmc.statbus.space
- $WWWDIR/statbus.space:/var/www/html/statbus.space
labels:
- traefik.enable=true
- traefik.http.routers.nginx-rtr.entrypoints=websecure
- traefik.http.routers.nginx-rtr.rule=(Host(`statbus.space`,`badger.statbus.space`,`gallery.statbus.space`,`renderbus.statbus.space`,`tgmc.statbus.space`,`matomo.statbus.space`))
- traefik.http.routers.nginx-rtr.tls.certresolver=prime-resolver
- traefik.http.routers.nginx-rtr.service=nginx-svc
- traefik.http.services.nginx-svc.loadbalancer.server.port=80
php:
restart: unless-stopped
container_name: php
build:
context: $DOCKERDIR/images/php
dockerfile: dockerfile
user: $PUID:$PGID
networks:
t2:
ipv4_address: 192.168.90.3
volumes:
- /home/atlantaned/tgstation:/tg
- $WWWDIR/badger.statbus.space:/var/www/html/badger.statbus.space
- $WWWDIR/matomo.statbus.space:/var/www/html/matomo.statbus.space
- $WWWDIR/statbus.space:/var/www/html/statbus.space
mariadb:
restart: unless-stopped
container_name: mariadb
image: mariadb:11.0
command: --max_allowed_packet=67136000
networks:
t2:
ipv4_address: 192.168.90.4
default:
ports:
- 127.0.0.1:3306:3306 #Required for SQL client
volumes:
- $DOCKERDIR/mariadb:/var/lib/mysql
secrets:
- mariadb_root_password
- mariadb_password
- mariadb_database
- mariadb_user
environment:
- MARIADB_ROOT_PASSWORD_FILE=/run/secrets/mariadb_root_password
- MARIADB_PASSWORD_FILE=/run/secrets/mariadb_password
- MARIADB_DATABASE_FILE=/run/secrets/mariadb_database
- MARIADB_USERE_FILE=/run/secrets/mariadb_user
- MARIADB_MYSQL_LOCALHOST_USER=true