-
-
Notifications
You must be signed in to change notification settings - Fork 62
/
nextcloud.yml
78 lines (72 loc) · 2.23 KB
/
nextcloud.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
version: '3.8'
x-nextcloud-labels: &nextcloud-labels
labels:
- traefik.enable=true
- traefik.docker.network=nextcloud
- traefik.http.routers.nextcloud-http.rule=Host(`nextcloud.${DOMAIN?Variable DOMAIN not set}`)
- traefik.http.routers.nextcloud-http.entrypoints=http
- traefik.http.routers.nextcloud-http.service=nextcloud
- traefik.http.routers.nextcloud-http.middlewares=https-redirect
- traefik.http.routers.nextcloud-https.rule=Host(`nextcloud.${DOMAIN?Variable DOMAIN not set}`)
- traefik.http.routers.nextcloud-https.entrypoints=https
- traefik.http.routers.nextcloud-https.tls=true
- traefik.http.routers.nextcloud-https.service=nextcloud
- traefik.http.routers.nextcloud-https.tls.certresolver=le
- traefik.http.services.nextcloud.loadbalancer.server.port=80
x-service: &service
logging:
driver: json-file
options:
max-size: "100m"
max-file: "2"
restart: always
networks:
- nextcloud
- database
services:
# https://hub.docker.com/_/nextcloud
nextcloud:
container_name: nextcloud
image: nextcloud
deploy:
mode: replicated
replicas: 1
resources:
reservations:
cpus: '0.01'
memory: 50M
<<: *nextcloud-labels
<<: *nextcloud-labels
<<: *service
environment:
POSTGRES_DB: nextcloud
POSTGRES_USER: nextcloud
POSTGRES_PASSWORD: ${NEXTCLOUD_SQL_PASSWORD?Variable NEXTCLOUD_SQL_PASSWORD not set}
POSTGRES_HOST: postgres
NEXTCLOUD_ADMIN_USER: ${USERNAME?Variable USERNAME not set}
NEXTCLOUD_ADMIN_PASSWORD: ${PASSWORD?Variable PASSWORD not set}
NEXTCLOUD_TRUSTED_DOMAINS: nextcloud.${DOMAIN?Variable DOMAIN not set}
VIRTUAL_HOST: nextcloud.${DOMAIN?Variable DOMAIN not set}
#NEXTCLOUD_UPDATE: "true"
volumes:
- nextcloud-data:/var/www/html
user: root
x-volume: &volume
driver: local
x-volume-driver-opts: &volume-driver-opts
type: none
o: bind
volumes:
nextcloud-data:
name: nextcloud-data
<<: *volume
driver_opts:
<<: *volume-driver-opts
device: ${DATAPATH?Variable DATAPATH not set}/nextcloud/data
networks:
nextcloud:
name: nextcloud
external: true
database:
name: database
external: true