-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
198 lines (176 loc) · 3.67 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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
version: '3'
services:
db:
container_name: nextcloud-mariadb
build: ./db
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
environment:
- MYSQL_DATABASE=nextcloud
env_file:
- ./env/db.env
restart: always
tmpfs:
- /tmp:size=256M
volumes:
- db:/var/lib/mysql
redis:
container_name: nextcloud-redis
image: redis:alpine
restart: always
tmpfs:
- /data:size=64M
postfix:
container_name: nextcloud-postfix
env_file:
- ./env/smtp.env
image: catatnight/postfix
restart: always
volumes:
- mail:/var/spool/postfix
app:
container_name: nextcloud-app
build: ./app
depends_on:
- db
- redis
environment:
# database
- MYSQL_DATABASE=nextcloud
- MYSQL_HOST=db
# redis
- REDIS_HOST=redis
# smtp
- SMTP_AUTHTYPE=LOGIN
- SMTP_HOST=postfix
- SMTP_PORT=25
env_file:
- ./env/db.env
- ./env/proxy.env
- ./env/smtp.env
restart: always
volumes:
- nextcloud:/var/www/html
cron:
container_name: nextcloud-cron
build: ./app/cron
depends_on:
- db
- redis
entrypoint: /cron.sh
restart: always
volumes:
- nextcloud:/var/www/html
web:
container_name: nextcloud-nginx
build: ./web
depends_on:
- app
env_file:
- ./env/proxy.env
networks:
- proxy-net
- default
restart: always
volumes:
- nextcloud:/var/www/html:ro
proxy:
container_name: nextcloud-proxy
build: ./proxy
#depends_on:
# - omgwtfssl
labels:
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
networks:
- proxy-net
ports:
- "80:80"
- "443:443"
restart: always
volumes:
- certs:/etc/nginx/certs:ro
- vhost.d:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- /var/run/docker.sock:/tmp/docker.sock:ro
omgwtfssl:
container_name: nextcloud-ssl
entrypoint: ["echo", "service omgwtfssl disabled"]
env_file:
- ./env/proxy.env
image: paulczar/omgwtfssl
networks:
- proxy-net
restart: "no"
volumes:
- certs:/certs
letsencrypt-companion:
container_name: nextcloud-letsencrypt
depends_on:
- proxy
image: jrcs/letsencrypt-nginx-proxy-companion
networks:
- proxy-net
restart: always
volumes:
- certs:/etc/nginx/certs
- vhost.d:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- /var/run/docker.sock:/var/run/docker.sock:ro
coturn:
container_name: nextcloud-coturn
build:
context: ./turn
dockerfile: Dockerfile
env_file:
- ./env/turn.env
networks:
- turn-net
ports:
- "3478:3478/tcp"
- "3478:3478/udp"
- "49160-49200:49160-49200/udp"
restart: always
tmpfs:
- /var/lib/coturn:size=512M
volumes:
# database volume
db:
driver: local
driver_opts:
type: none
o: bind
device: /var/pool/nextcloud/db
# postfix mails
mail:
driver: local
driver_opts:
type: none
o: bind
device: /var/pool/nextcloud/mail
# nextcloud data volume
nextcloud:
driver: local
driver_opts:
type: none
o: bind
device: /var/pool/nextcloud/data
certs:
driver: local
driver_opts:
type: none
o: bind
device: /var/pool/nextcloud/certs
vhost.d:
driver: local
driver_opts:
type: none
o: bind
device: /var/pool/nextcloud/vhost
html:
driver: local
driver_opts:
type: none
o: bind
device: /var/pool/nextcloud/html
networks:
proxy-net:
turn-net: