Hi all,
I have the following docker-compose.yaml to set up Nginx, Nextcloud and Collabora. This is my first attempt at using docker-compose, and really the first major go at using docker for something other than a tutorial.
version: '3'
# Environment Variables
# =====================
# > NC_MYSQL_PASSWORD
# > NC_MYSQL_ROOT_PASSWORD
# > NPM_MYSQL_PASSWORD
# > NPM_MYSQL_ROOT_PASSWORD
# > COLLABORA_PASSWORD
# > COLLABORA_USERNAME
# > COLLABORA_DOMAIN
volumes:
nextcloud-data:
nextcloud-db:
npm-data:
npm-ssl:
npm-db:
networks:
frontend:
backend:
services:
code:
image: collabora/code:latest
restart: always
environment:
- password=${COLLABORA_PASSWORD:?Not defined!}
- username=${COLLABORA_USERNAME:?Not defined!}
- domain=${COLLABORA_DOMAIN:?Not defined!}
- extra_params=--o:ssl.enable=true
networks:
- frontend
- backend
nextcloud-app:
image: nextcloud:stable
restart: always
volumes:
- nextcloud-data:/var/www/html
environment:
- MYSQL_PASSWORD=${NC_MYSQL_PASSWORD:?Not defined!}
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud-user
- MYSQL_HOST=nextcloud-db
networks:
- frontend
- backend
nextcloud-db:
image: mariadb
restart: always
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW --innodb-file-per-table=1 --skip-innodb-read-only-compressed
volumes:
- nextcloud-db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=${NC_MYSQL_ROOT_PASSWORD:?Not defined!}
- MYSQL_PASSWORD=${NC_MYSQL_PASSWORD:?Not defined!}
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud-user
networks:
- backend
npm-app:
image: jc21/nginx-proxy-manager:latest
restart: always
ports:
- "80:80"
- "81:81"
- "443:443"
environment:
- DB_MYSQL_HOST=npm-db
- DB_MYSQL_PORT=3306
- DB_MYSQL_USER=npm-user
- DB_MYSQL_PASSWORD=${NPM_MYSQL_PASSWORD:?Not defined!}
- DB_MYSQL_NAME=npm
volumes:
- npm-data:/data
- npm-ssl:/etc/letsencrypt
networks:
- frontend
- backend
npm-db:
image: jc21/mariadb-aria:latest
restart: always
environment:
- MYSQL_ROOT_PASSWORD=${NPM_MYSQL_ROOT_PASSWORD:?Not defined!}
- MYSQL_DATABASE=npm
- MYSQL_USER=npm-user
- MYSQL_PASSWORD=${NPM_MYSQL_PASSWORD:?Not defined!}
volumes:
- npm-db:/var/lib/mysql
networks:
- backend
Nginx and Nextcloud are working really nicely, but Collabora not so much. I have Nginx Proxy Manager set up for:
nginx.domain.com
nextcloud.domain.com
collabora.domain.com
The proxy for Collabora is set up as follows…
Domain name: collabora@domain.com
Scheme: https
Forward Hostname/IP: code
Forward Port: 9980
Cache Assets: disabled
Block Common Exploits: enabled
Websockets Support: enabledSSL Certificate (issued by Let’s Encrypt)
Force SSL: enabled
HTTP/2 Support: enabled
HSTS Enabled: enabled
HSTS Subdomains: disabled
When I navigate to collabora.domain.com
, I get the OK
message.
When I navigate to collabora.domain.com/loleaflet/dist/admin/admin.html
I get a login form pop up, but when I enter the credentials passed into the docker-compose file, it just shows me the login form again. No message or anything.
When I try to link up Nextcloud to the CODE server using collabora.domain.com
, I get the Could not establish connection to the Collabora Online server.
message.
Any ideas what I’ve done wrong here?