Nextcloud/Collabora docker-compose help


#1

I’m able to get Nextcloud working with the docker-compose settings below. I have then tried to add a Collabora container. The container is up and running, but I can’t edit docs inside Nextcloud, I just get a blank screen.
Can someone kindly offer any assistance?

version: '3'

services:

  proxy:
    image: jwilder/nginx-proxy
    labels:
      - "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy=true"
    container_name: proxy
    networks:
      - nc_network
    ports:
      - 80:80
      - 443:443
    volumes:
      - ./proxy/conf.d:/etc/nginx/conf.d:rw
      - ./proxy/vhost.d:/etc/nginx/vhost.d:rw
      - ./proxy/html:/usr/share/nginx/html:rw
      - ./proxy/certs:/etc/nginx/certs:ro
      - /etc/localtime:/etc/localtime:ro
      - /var/run/docker.sock:/tmp/docker.sock:ro
    restart: unless-stopped
  
  letsencrypt:
    image: jrcs/letsencrypt-nginx-proxy-companion
    container_name: letsencrypt
    depends_on:
      - proxy
    networks:
      - nc_network
    volumes:
      - ./proxy/certs:/etc/nginx/certs:rw
      - ./proxy/vhost.d:/etc/nginx/vhost.d:rw
      - ./proxy/html:/usr/share/nginx/html:rw
      - /etc/localtime:/etc/localtime:ro
      - /var/run/docker.sock:/var/run/docker.sock:ro
    restart: unless-stopped

  db:
    image: mariadb
    container_name: mariadb
    networks:
      - nc_network
    volumes:
      - db:/var/lib/mysql
      - /etc/localtime:/etc/localtime:ro
    environment:
      - MYSQL_ROOT_PASSWORD=$$$$$$$$
      - MYSQL_PASSWORD=$$$$$$$$
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
    restart: unless-stopped
  
  app:
    image: nextcloud:latest
    container_name: app
    networks:
      - nc_network
    depends_on:
      - letsencrypt
      - proxy
      - db
    volumes:
      - nextcloud:/var/www/html
      - ./app/config:/var/www/html/config
      - ./app/custom_apps:/var/www/html/custom_apps
      - ./app/data:/var/www/html/data
      - ./app/themes:/var/www/html/themes
      - /etc/localtime:/etc/localtime:ro
    environment:
      - VIRTUAL_HOST=domain.com
      - LETSENCRYPT_HOST=domain.com
      - LETSENCRYPT_EMAIL=web@domain.com
    restart: unless-stopped
  
  office:
    image: collabora/code
    container_name: office
    networks:
      - nc_network
    expose:
      - 9980
    cap_add:
      - MKNOD
    environment:
      - domain=domain.com
      - VIRTUAL_HOST=office.domain.com
      - LETSENCRYPT_HOST=office.domain.com
      - LETSENCRYPT_EMAIL=web@domain.com
    restart: unless-stopped

volumes:
  nextcloud:
  db:

networks:
  nc_network:

#2

It seems I have solved the issue.
Originally, I had tried to insert the reverse proxy code into /proxy/conf.d/default.conf, but the file would reset and not keep any changes after a restart.

Instead, I just made a new file named /proxy/conf.d/domain.conf, and pasted the reverse proxy code from icewind.nl, now it all works.