Compare commits
No commits in common. "1572aabe53e6b094d87fa03f3ca8872318ffcddf" and "6b254cc1d70e2fa714c2d94c2c4f8024a8d8d8a1" have entirely different histories.
1572aabe53
...
6b254cc1d7
@ -2,7 +2,7 @@
|
|||||||
title: Nextcloud & Collabora
|
title: Nextcloud & Collabora
|
||||||
description: How to configure a properly working setup using Traefik
|
description: How to configure a properly working setup using Traefik
|
||||||
published: true
|
published: true
|
||||||
date: 2020-05-07T11:33:22.135Z
|
date: 2020-04-30T19:21:45.022Z
|
||||||
tags:
|
tags:
|
||||||
---
|
---
|
||||||
|
|
||||||
@ -10,91 +10,69 @@ tags:
|
|||||||
|
|
||||||
Our setup relies heavily on `traefik` and won't work without it. See our traefik configuration page on how to prepare your system to accept this configuration.
|
Our setup relies heavily on `traefik` and won't work without it. See our traefik configuration page on how to prepare your system to accept this configuration.
|
||||||
|
|
||||||
|
> This configuration hasn't been updated to Traefik v2 yet
|
||||||
|
{.is-warning}
|
||||||
|
|
||||||
|
|
||||||
# docker-compose.yml
|
# docker-compose.yml
|
||||||
|
|
||||||
```
|
```
|
||||||
version: '3'
|
version: '3.7'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
nginx:
|
nextcloud:
|
||||||
image: nginx:alpine
|
image: nextcloud:18
|
||||||
restart: unless-stopped
|
|
||||||
volumes:
|
|
||||||
- ./nginx.conf:/etc/nginx/nginx.conf
|
|
||||||
- ./nextcloud:/var/www/html
|
|
||||||
labels:
|
|
||||||
- traefik.enable=true
|
|
||||||
- traefik.http.routers.cloud.entryPoints=web-secure
|
|
||||||
- traefik.http.routers.cloud.rule=Host(`cloud.fosc.space`)
|
|
||||||
- traefik.http.routers.cloud.tls.certresolver=default
|
|
||||||
- traefik.http.routers.cloud.middlewares=cloud@docker
|
|
||||||
- traefik.http.middlewares.cloud.headers.customFrameOptionsValue=SAMEORIGIN
|
|
||||||
- traefik.http.middlewares.cloud.headers.framedeny=true
|
|
||||||
- traefik.http.middlewares.cloud.headers.sslredirect=true
|
|
||||||
- traefik.http.middlewares.cloud.headers.stsSeconds=15552000
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- fpm
|
- postgres
|
||||||
|
- collabora
|
||||||
fpm:
|
- redis
|
||||||
image: nextcloud
|
|
||||||
restart: unless-stopped
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./nextcloud:/var/www/html
|
- ./nextcloud:/var/www/html
|
||||||
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
- NEXTCLOUD_TRUSTED_DOMAINS=cloud.fosc.space
|
- NEXTCLOUD_TRUSTED_DOMAINS=cloud.fosc.space
|
||||||
|
- POSTGRES_HOST=postgres
|
||||||
|
- POSTGRES_USER=postgres
|
||||||
|
- POSTGRES_PASSWORD=aaaaaaaaaaaaa
|
||||||
|
- POSTGRES_DB=nextcloud
|
||||||
- REDIS_HOST=redis
|
- REDIS_HOST=redis
|
||||||
- MYSQL_HOST=mariadb
|
labels:
|
||||||
- MYSQL_USER=nextcloud
|
- "traefik.frontend.rule=Host:cloud.fosc.space"
|
||||||
- MYSQL_PASSWORD=hunter2
|
- "traefik.frontend.headers.STSSeconds=15552000"
|
||||||
- MYSQL_DATABASE=nextcloud
|
- "traefik.frontend.redirect.regex=https://(.*)/.well-known/(card|cal)dav"
|
||||||
- NEXTCLOUD_ADMIN_USER=admin
|
- "traefik.frontend.redirect.replacement=https://$$1/remote.php/dav/"
|
||||||
- NEXTCLOUD_ADMIN_PASSWORD=hunter2
|
- "traefik.frontend.redirect.permanent=true"
|
||||||
depends_on:
|
|
||||||
- mariadb
|
|
||||||
- redis
|
|
||||||
- cron
|
|
||||||
|
|
||||||
mariadb:
|
postgres:
|
||||||
image: mariadb
|
image: postgres:alpine
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
- MYSQL_ROOT_PASSWORD=hunter2
|
- POSTGRES_USER=postgres
|
||||||
- MYSQL_USER=nextcloud
|
- POSTGRES_PASSWORD=aaaaaaaaaaaaa
|
||||||
- MYSQL_PASSWORD=hunter2
|
|
||||||
- MYSQL_DATABASE=nextcloud
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./db:/var/lib/mysql
|
- ./db:/var/lib/postgresql/data
|
||||||
|
labels:
|
||||||
|
- traefik.enable=false
|
||||||
|
|
||||||
collabora:
|
collabora:
|
||||||
image: collabora/code
|
image: collabora/code
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
- username=admin
|
- username=admin
|
||||||
- password=hunter3
|
- password=eeeeeeeeeeeee
|
||||||
- DONT_GEN_SSL_CERT=true
|
- DONT_GEN_SSL_CERT=true
|
||||||
- "domain=cloud\\.fosc\\.space"
|
- "domain=cloud\\.fosc\\.space"
|
||||||
- "extra_params=--o:ssl.enable=false --o:ssl.termination=true --o:storage.wopi.host[0]=::ffff:[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+ --o:net.post_allow.host[0]=::ffff:[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+ --o:storage.wopi.host[1]=[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+ --o:net.post_allow.host[1]=[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+ --o:storage.wopi.host[2]=cloud.fosc.space"
|
- "extra_params=--o:ssl.enable=false --o:ssl.termination=true --o:storage.wopi.host[0]=::ffff:[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+ --o:net.post_allow.host[0]=::ffff:[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+ --o:storage.wopi.host[1]=[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+ --o:net.post_allow.host[1]=[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+ --o:storage.wopi.host[2]=cloud.fosc.space"
|
||||||
labels:
|
labels:
|
||||||
- traefik.enable=true
|
- "traefik.frontend.rule=Host:collabora.fosc.space"
|
||||||
- traefik.http.routers.coll.entryPoints=web-secure
|
- "traefik.port=9980"
|
||||||
- traefik.http.routers.coll.rule=Host(`collabora.fosc.space`)
|
|
||||||
- traefik.http.routers.coll.tls.certresolver=default
|
|
||||||
- traefik.http.services.coll.loadbalancer.server.port=9980
|
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
image: redis:alpine
|
image: redis
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
labels:
|
||||||
cron:
|
- traefik.enable=false
|
||||||
image: nextcloud
|
|
||||||
restart: always
|
|
||||||
volumes:
|
|
||||||
- ./nextcloud:/var/www/html
|
|
||||||
entrypoint: /cron.sh
|
|
||||||
depends_on:
|
|
||||||
- mariadb
|
|
||||||
- redis
|
|
||||||
```
|
```
|
||||||
|
|
||||||
# Nextcloud configuration
|
# Nextcloud configuration
|
||||||
@ -105,6 +83,9 @@ Once everything is up and running, install the Collabora plugin for Nextcloud an
|
|||||||
{.is-info}
|
{.is-info}
|
||||||
|
|
||||||
# Quirks
|
# Quirks
|
||||||
> To get rid of the secure proxy warning, add a `NEXTCLOUD_TRUSTED_PROXIES` entry to Nextcloud's config.php with your host's hostname or IP address. For some reason, this configuration is not exposed via environment variables and cannot be fixed from docker-compose.
|
> The Collabora container is extremely slow to start and seems to work about only half the time. If stuff isn't working, just restart it once or twice. Eventually it will work.
|
||||||
|
|
||||||
|
>This configuration is 100% working and any attempt at touching it will just make it worse.
|
||||||
|
{.is-warning}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user