Can't find the directory "/hosting/discovery"

Hello,

I was having same problem few days ago. This post: [Collabora] Configuration with docker-compose was very useful.

If you don’t want to configure all the reverse proxy like me, use these two containers:

My configuration: (It’s better to use docker compose)

I don’t understand all the things, but it works.

At first, run proxy:

nginx-proxy

docker run -d \
    --restart always \
    --name nginx-proxy \
    -v /srv/certs:/etc/nginx/certs:ro \
    -v /etc/nginx/vhost.d \
    -v /usr/share/nginx/html \
    -v /var/run/docker.sock:/tmp/docker.sock:ro \
    -p 80:80 \
    -p 443:443 \
    jwilder/nginx-proxy

Next, run container for Let’s Encrypt:

letsencrypt-nginx-proxy-companion

docker run -d \
    --restart always \
    --name nginx-proxy-letsencrypt \
    -v /srv/certs:/etc/nginx/certs:rw \
    --volumes-from nginx-proxy \
    -v /var/run/docker.sock:/var/run/docker.sock:ro \
    jrcs/letsencrypt-nginx-proxy-companion

If you now run container, which has exposed port, it automaticaly redirect the traffic to container and generate certificate for https. All you need is specify some environment variables:

  • VIRTUAL_HOST for nginx-proxy
  • LETSENCRYPT_HOST and LETSENCRYPT_EMAIL for Let’s Encrypt

You don’t need to publish ports with docker run, port 80 and 443 is bind to nginx-proxy, forwarding is done localy.

For this example, nextcloud is on nc.domain.com and colabora on office.domain.com, but you can setup your own. I’m using wonderfall/nextcloud image, but you can use another.

nextcloud

docker run -d \
    --restart always \
    --name nc \
    --hostname nc.domain.com \
    -v /srv/data/nc/data:/data \
    -v /srv/data/nc/config:/config \
    --env VIRTUAL_HOST=nc.domain.com \
    --env LETSENCRYPT_HOST=nc.domain.com \
    --env LETSENCRYPT_EMAIL=a@b.c \
    wonderfall/nextcloud:daily

And finally, the collabora container:

code

docker run -t -d \
        --name nc-code \
        --hostname office.domain.com \
        --env VIRTUAL_HOST=office.domain.com \
        --env LETSENCRYPT_HOST=office.domain.com \
        --env LETSENCRYPT_EMAIL=a@b.c \
        --env VIRTUAL_PORT=9980 \
        --env VIRTUAL_PROTO=https \
        --env DOMAIN='nc\\.domain\\.com' \
        --restart always \
        --cap-add MKNOD \
        --expose 9980 \
        collabora/code

Now you only activate collabora connector app in nextcloud and in administraction choose https://office.domain.com as a collabora server.

Maybe it will be useful for you.