-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
executable file
·189 lines (178 loc) · 4.37 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
services:
web:
build: ./docker/web
restart: unless-stopped
volumes_from:
- nextcloud
depends_on:
- nextcloud
labels:
caddy: ${APP_URL:-localhost}, nextcloud.local
caddy.reverse_proxy: '{{upstreams 80}}'
networks:
- frontend
- proxy
nextcloud:
build:
context: ./docker/nextcloud
dockerfile: Dockerfile
args:
NC_VERSION: ${NC_VERSION:-28}
target: ${ENV:-development}
restart: unless-stopped
depends_on:
mariadb:
condition: service_healthy
redis:
condition: service_healthy
env_file:
- .env
environment:
MYSQL_HOST: mariadb:3306
REDIS_HOST: redis
networks:
- frontend
- backend
extra_hosts:
- host.docker.internal:host-gateway
- onlyoffice.local:host-gateway
volumes:
- nc-app:/var/www/html
- ./:/var/www/html/custom_apps/files_external_ethswarm
cron:
image: nextcloud:${NC_VERSION:-28}-fpm-alpine
restart: always
volumes:
- nc-app:/var/www/html:z
entrypoint: /cron.sh
depends_on:
nextcloud:
condition: service_started
mariadb:
condition: service_healthy
redis:
condition: service_healthy
redis:
image: redis:alpine
restart: unless-stopped
environment:
REDIS_HOST_PASSWORD: ${REDIS_HOST_PASSWORD:-secret}
command: redis-server --requirepass ${REDIS_HOST_PASSWORD:-secret}
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
start_period: 3s
timeout: 5s
interval: 30s
networks:
- backend
mariadb:
image: mariadb:latest
# set transaction isolation: https://docs.nextcloud.com/server/stable/admin_manual/configuration_database/linux_database_configuration.html
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW --innodb-file-per-table=1 --skip-innodb-read-only-compressed
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-rootpassword}
MYSQL_DATABASE: ${MYSQL_DATABASE:-nextcloud}
MYSQL_USER: ${MYSQL_USER:-nextcloud}
MYSQL_PASSWORD: ${MYSQL_PASSWORD:-secret}
volumes:
- nc-db:/var/lib/mysql
healthcheck:
test: [ "CMD", "healthcheck.sh", "--su-mysql", "--connect", "--innodb_initialized" ]
start_period: 3s
timeout: 5s
interval: 30s
networks:
- backend
adminer:
image: adminer:latest
restart: unless-stopped
networks:
- backend
ports:
- '8080:8080'
depends_on:
- mariadb
environment:
ADMINER_DEFAULT_SERVER: mariadb
profiles:
- dev
rsync:
build:
context: ./docker/rsync
dockerfile: Dockerfile
restart: unless-stopped
cpu_shares: 512
mem_limit: 256m
volumes:
- nc-app:/app:ro
- ./dev-environment/nextcloud_source:/source
environment:
- RSYNC_CRONTAB=crontab
depends_on:
- nextcloud
networks:
- backend
profiles:
- dev
onlyoffice:
image: onlyoffice/documentserver
environment:
JWT_ENABLED: true
JWT_SECRET: secret
JWT_HEADER: AuthorizationJwt
JWT_IN_BODY: true
USE_UNAUTHORIZED_STORAGE: true
restart: unless-stopped
volumes:
- onlyoffice_data:/var/www/onlyoffice/Data
- onlyoffice_db:/var/lib/postgresql
- onlyoffice_lib:/var/lib/onlyoffice
- onlyoffice_logs:/var/log/onlyoffice
extra_hosts:
- nextcloud.local:host-gateway
networks:
- backend
- proxy
labels:
caddy: onlyoffice.local
caddy.reverse_proxy: '{{upstreams 80}}'
profiles:
- dev
proxy:
image: lucaslorentz/caddy-docker-proxy:alpine
restart: unless-stopped
ports:
- "80:80"
- "443:443"
- "443:443/udp"
volumes:
- caddy_data:/data
- caddy_config:/config
- /var/run/docker.sock:/var/run/docker.sock
environment:
CADDY_INGRESS_NETWORKS: hejbit-network
networks:
- proxy
healthcheck:
test: [ "CMD", "curl", "--fail", "http://localhost:2019/reverse_proxy/upstreams" ]
timeout: 30s
retries: 3
start_period: 10s
profiles:
- dev
volumes:
nc-app:
nc-db:
caddy_data:
caddy_config:
onlyoffice_data:
onlyoffice_db:
onlyoffice_lib:
onlyoffice_logs:
networks:
frontend:
backend:
proxy:
# external: true
name: hejbit-network