From ca84d8174ba86a5514b0148cc5644b4d08b90885 Mon Sep 17 00:00:00 2001 From: Stephan Porada Date: Mon, 3 May 2021 12:19:55 +0200 Subject: [PATCH] Configure traefik and nextcloud to use a static IP for collabora --- nextcloud/live.env.tpl | 3 +-- traefik/docker-compose.yml | 10 ++++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/nextcloud/live.env.tpl b/nextcloud/live.env.tpl index 80bd0cf..bffae97 100644 --- a/nextcloud/live.env.tpl +++ b/nextcloud/live.env.tpl @@ -14,8 +14,7 @@ REDIS_HOST_PASSWORD=password_redis NEXTCLOUD_ROOT=/home/compute/services/nextcloud NEXTCLOUD_DATA_DIR=/srv/nextcloud/data NEXTCLOUD_FQDN=your_nextcloud_sub_domain.domain.com -# This is the IP of the Trafik container. This changes if the traefik container restarts. If it is not the current traefik container IP collabora does not work. Check the current traefik container IP with: docker inspect traefik and get the IP from the Networks -> traefik_default -> IPAddress section -TRAEFIK_CONTAINER_IP=172.27.0.16 +TRAEFIK_CONTAINER_IP=172.27.0.16 # This is the traefik container ip in the traefik_default network. I configured the traefik container with a static IP so this does not have to be changed anymore. PHP_MEMORY_LIMIT=2048M PHP_UPLOAD_LIMIT=8G diff --git a/traefik/docker-compose.yml b/traefik/docker-compose.yml index 321d762..512b74d 100644 --- a/traefik/docker-compose.yml +++ b/traefik/docker-compose.yml @@ -3,11 +3,12 @@ version: '3.5' networks: default: driver: bridge + ipam: + config: + - subnet: 172.27.0.0/24 socket_proxy: - external: name: socket_proxy - services: # Only accept needed incoming docker API calls socket-proxy: @@ -92,8 +93,9 @@ services: # The official v2 Traefik docker image image: traefik:v2.3 networks: - - socket_proxy - - default + default: + ipv4_address: 172.27.0.100 + socket_proxy: null env_file: live.env container_name: "traefik" # Enables the web UI and tells Traefik to listen to docker