-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose-self-signed.yml
177 lines (155 loc) · 3.07 KB
/
docker-compose-self-signed.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
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
volumes:
- db:/var/lib/mysql
- dbtmp:/tmp
redis:
container_name: nextcloud-redis
image: redis:alpine
restart: always
volumes:
- rediscache:/data
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/nginx.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/nginx.env
networks:
- proxy-net
- default
restart: always
volumes:
- nextcloud:/var/www/html:ro
proxy:
container_name: nextcloud-proxy
build: ./proxy
depends_on:
- omgwtfssl
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
env_file:
- ./env/sslcert.env
image: paulczar/omgwtfssl
networks:
- proxy-net
restart: "no"
volumes:
- certs:/certs
volumes:
# database volumes
db:
driver: local
driver_opts:
type: none
o: bind
device: /var/pool/nextcloud/db
dbtmp:
driver: local
driver_opts:
type: none
o: bind
device: /var/ramdisk/dbcache
# redis cache volume
rediscache:
driver: local
driver_opts:
type: none
o: bind
device: /var/ramdisk/rediscache
# 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: