-
Notifications
You must be signed in to change notification settings - Fork 16
/
docker-compose.yml
136 lines (128 loc) · 3.64 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
#
# NEXTCLOUD WITH POSTGRESQL LETSENCRYPT COLLABORA CRON-SUPPORT
# https://github.com/bentolor/docker-nextcloud-collabora-postgresql-letsencrypt
#
#
# INITIAL SETUP
# 1. register get two dynamic domains i.e. at https://freedns.org
# - one for your nextcloud: mynextcloud.mooo.com
# - one only to host Collabora: myoffice.mooo.com
# 2. publicy expose TCP port 80 & 443 of your host in router
# 3. Adjust all [##VALUES##] in the files: docker-compose.yml and db.env
# 4. Run `sudo docker-compose up --build`
# 5. Activate Collabora pluing in nextcloud &
# configure https://[##myoffice.mooo.com##] as URL
#
# UPGRADE/REBUILD
# sudo docker-compose down
# sudo docker-compose build --pull
# sudo docker-compose up -d
#
version: '3'
services:
db:
image: postgres:12-alpine
container_name: nextcloud-db
restart: always
volumes:
- nextcloud-db:/var/lib/postgresql/data
env_file:
- db.env
app:
build: ./nextcloud-cron
container_name: nextcloud
restart: always
volumes:
- nextcloud-data:/var/www/html
- /etc/localtime:/etc/localtime:ro
environment:
- VIRTUAL_HOST=[##mynextcloud.mooo.com##]
- LETSENCRYPT_HOST=[##mynextcloud.mooo.com##]
- POSTGRES_HOST=db
- POSTGRES_DB=nextcloud
- NEXTCLOUD_OVERWRITEPROTOCOL=https
- NEXTCLOUD_ADMIN_USER=admin
- NEXTCLOUD_ADMIN_PASSWORD=[##GENERATED PASSWORD##]
#- SMTP_HOST=
#- SMTP_SECURE=tls
#- SMTP_PORT=587
#- SMTP_NAME=xxx
#- SMTP_PASSWORD=xxx
#- MAIL_FROM_ADDRESS=xxx
#- MAIL_DOMAIN=xxx
env_file:
- db.env
depends_on:
- db
networks:
- proxy-tier
- default
# DB is on default network; remaining on proxy-tier
proxy:
build: ./proxy
container_name: proxy
restart: always
environment:
- DISABLE_ACCESS_LOGS=1
ports:
- 7080:80
- 7443:443
volumes:
- proxy-certs:/etc/nginx/certs:ro
- proxy-vhost.d:/etc/nginx/vhost.d
- proxy-html:/usr/share/nginx/html
- /var/run/docker.sock:/tmp/docker.sock:ro
networks:
- proxy-tier
letsencrypt-companion:
image: nginxproxy/acme-companion
container_name: letsencrypt
restart: always
volumes:
- proxy-certs:/etc/nginx/certs
- proxy-vhost.d:/etc/nginx/vhost.d
- proxy-html:/usr/share/nginx/html
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- letsencrypt:/etc/acme.sh
environment:
- NGINX_PROXY_CONTAINER=proxy
- DEFAULT_EMAIL=[##A REACHABLE EMAIL ADRESS##]
# Production certification issue rate is limited to 5 certificate issues in some timeframe
# Uncomment the following to test your deployments safely. The browser will warn on the SSL certificates.
#- LETSENCRYPT_TEST=true
networks:
- proxy-tier
depends_on:
- proxy
collabora:
image: collabora/code
container_name: collabora
restart: always
networks:
- proxy-tier
depends_on:
- proxy
cap_add:
- MKNOD
ports:
- 127.0.0.1:9980:9980
environment:
# IMPORTANT: Note the backslashs before the dots here (and only here)!
- domain=[##mynextcloud\.mooo\.com##]
- username=admin
- password=[##A SECURE GENERATED PASSWORD##]
- VIRTUAL_HOST=[##myoffice.mooo.com##]
- LETSENCRYPT_HOST=[##myoffice.mooo.com##]
- VIRTUAL_NETWORK=proxy-tier
- VIRTUAL_PORT=9980
- extra_params=--o:ssl.enable=false --o:ssl.termination=true
volumes:
nextcloud-db:
nextcloud-data:
proxy-certs:
proxy-vhost.d:
proxy-html:
letsencrypt:
networks:
proxy-tier: