]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Fix docker nginx container if peertube restarts
authorChocobozzz <me@florianbigard.com>
Tue, 5 Jan 2021 08:52:14 +0000 (09:52 +0100)
committerChocobozzz <me@florianbigard.com>
Tue, 5 Jan 2021 08:52:14 +0000 (09:52 +0100)
support/doc/docker.md
support/docker/production/docker-compose.yml

index 36da94f55c06c1b55b5de3eb220103547a9e59cd..e9315293fecd4b15843246ed268900b269e3a2f4 100644 (file)
@@ -63,8 +63,6 @@ intuited from usage.
 Install the template that the nginx container will use.
 The container will generate the configuration by replacing `${WEBSERVER_HOST}` and `${PEERTUBE_HOST}` using your docker compose env file.
 
-It will also generate a TLS certificate at startup and schedule a renew
-
 ```shell
 mkdir -p docker-volume/nginx
 curl https://raw.githubusercontent.com/Chocobozzz/PeerTube/develop/support/nginx/peertube > docker-volume/nginx/peertube
@@ -77,7 +75,7 @@ mkdir -p docker-volume/certbot
 docker run -it --rm --name certbot -p 80:80 -v "$(pwd)/docker-volume/certbot/conf:/etc/letsencrypt" certbot/certbot certonly --standalone
 ```
 
-The docker-compose will automatically renew this certificate and reload nginx.
+A dedicated container in the docker-compose will automatically renew this certificate and reload nginx.
 
 
 #### Test your setup
index 4ad1a8756ca73dfefdc8cde0b5f6ee539dea85fe..e23f31c3924e8c9608f6e8a8cceb9352be08c296 100644 (file)
@@ -46,6 +46,11 @@ services:
     #   context: .
     #   dockerfile: ./support/docker/production/Dockerfile.buster
     image: chocobozzz/peertube:production-buster
+    # Use a static IP for this container because nginx does not handle proxy host change without reload
+    # This container could be restarted on crash or until the postgresql database is ready for connection
+    networks:
+      default:
+        ipv4_address: 172.18.0.42
     env_file:
       - .env
     # If you provide your own webserver and reverse-proxy, otherwise not suitable for production: