Integration with https://github.com/jwilder/nginx-proxy
Hello, could someone help me in making this container work with https://github.com/jwilder/nginx-proxy
I've followed nginx instructions ie customizing nginx configuration but no success. Any help would be very much appreciated. Thanks
Hi, here is my docker-compose file. Maybe it may help you.
collabora-code:
image: collabora/code
environment:
- VIRTUAL_HOST=office.example.com
- VIRTUAL_PORT=9980
- VIRTUAL_PROTO=https
- LETSENCRYPT_HOST=office.example.com
- [email protected]
- domain=cloud\\.example\\.com
- username=admin
- password=PASSWORD
restart: always
cap_add:
- ALL
AFAIK jwilder/nginx-proxy wants the container to expose the port. It would be nice if the collabora Dockerfile contains
EXPOSE 9980
but you can do it by yourself with --expose 9980 (when running from cli) or the expose field from a docker-compose.yml.
I know this is an old thread, but I was wondering if anyone for collabora working with nginx-proxy?
@MrErr Yes, It works for me, also with the letsencrypt-nginx-proxy-companion...
My docker-compose file:
code:
restart: unless-stopped
hostname: office.${DOMAIN}
environment:
- domain=${DOMAIN}
- VIRTUAL_HOST=office.${DOMAIN}
- LETSENCRYPT_HOST=office.${DOMAIN}
- [email protected]
- VIRTUAL_PORT=9980
- VIRTUAL_PROTO=https
ports:
- "9980"
cap_add:
- MKNOD
image: collabora/code
@lachmanfrantisek last night I wasted hours to get it working. With every possible configuration I had the same issue. When I try to open a document I get the message:
Unable to connect. Firefox can’t establish a connection to the server at office.mydomain.org. <
When I try to open office.mydomain.org I get the [ok]. Could it be an issue with https:// vs. http://? only http works for me. I can't say why. Is it possible for you to share your whole docker-compose.yml? Thanks in advance.
Edit: it works now, as i assumed it was an https-thingy. I have the domain at 1und1, all I had to do was to delete the DNS-Entries for AAAA.
I have not been able to get it to work. But I get a different error. Mine is
The server was unable to complete your request.
If this happens again, please send the technical details below to the server administrator.
More details can be found in the server log. Technical details
Remote Address: 172.18.0.1 Request ID: LUydcItgF2ZJgAPno2Cp
I have a working environment with SSL support in both sides, nextcloud and collabora.
Some key points:
- Both nextloud and collabora pass through nginx-proxy
- In order to do so, I have a DNS container that resolves those names to the private IP address of the nginx-proxy
- Both nextloud and collabora should have connectivity to each other
So let's go with configs:
nginx-proxy
sudo mkdir -p /srv/data/computer/docker/nginx-proxy/vhost.d
sudo mkdir -p /srv/data/computer/docker/nginx-letsencrypt/certs
sudo touch /srv/data/computer/docker/nginx-proxy/network_internal.conf
sudo vim /srv/data/computer/docker/nginx-proxy/network_internal.conf
# Docker VPN
allow 10.43.3.0/24;
# Deny docker host LAN interface, triggered when connections come from DMZ
deny 10.41.0.2;
# LAN
allow 10.41.0.0/24;
# Traffic from all other networks will be rejected
deny all;
docker run --name nginx-proxy \
-p 80:80 \
-p 8443:443 \
-v /srv/data/computer/docker/nginx-letsencrypt/certs:/etc/nginx/certs:ro \
-v /srv/data/computer/docker/nginx-proxy/vhost.d:/etc/nginx/vhost.d \
-v /srv/data/computer/docker/nginx-proxy/network_internal.conf:/etc/nginx/network_internal.conf \
-v /usr/share/nginx/html \
-v /var/run/docker.sock:/tmp/docker.sock:ro \
--label com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy \
-d jwilder/nginx-proxy
nginx-letsencrypt
docker run --name nginx-letsencrypt \
-v /srv/data/computer/docker/nginx-letsencrypt/certs:/etc/nginx/certs:rw \
--volumes-from nginx-proxy \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
-d jrcs/letsencrypt-nginx-proxy-companion
Nexcloud
docker run --name drive \
--link mariadb:mysql \
--link ldap:ldap \
--link nginx-proxy:collabora.example.com \
-v /srv/data/computer/docker/drive/nextcloud:/var/www/html \
-v /srv/data/computer/docker/drive/apps:/var/www/html/custom_apps \
-v /srv/data/computer/docker/drive/config:/var/www/html/config \
-v /srv/data/computer/docker/drive/data:/var/www/html/data \
-e MYSQL_DATABASE=drive \
-e MYSQL_USER=drive \
-e MYSQL_PASSWORD=drive \
-e MYSQL_HOST=mysql \
-e VIRTUAL_HOST=drive.example.com \
-e VIRTUAL_PORT=80 \
-e VIRTUAL_PROTO=http \
-e LETSENCRYPT_HOST=drive.example.com \
-e [email protected] \
-e RESOLVE_TO_PROXY_IP=true \
-d nextcloud
Collabora
docker run \
-t \
--name collabora \
-e "domain=drive\\.example\\.com|drivetest\\.example\\.com" \
-e "username=admin" \
-e "password=secret" \
--cap-add MKNOD \
--expose 9980 \
-e "SLEEPFORDEBUGGER=0" \
--link nginx-proxy:drivetest.example.com \
--link nginx-proxy:drive.example.com \
-e VIRTUAL_HOST=collabora.example.com \
-e VIRTUAL_PORT=9980 \
-e VIRTUAL_PROTO=https \
-e LETSENCRYPT_HOST=collabora.example.com \
-e [email protected] \
-e RESOLVE_TO_PROXY_IP=true \
-e NETWORK_ACCESS=internal \
-d collabora/code