aboutsummaryrefslogtreecommitdiffhomepage
path: root/support
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-01-05 09:52:14 +0100
committerChocobozzz <me@florianbigard.com>2021-01-05 09:52:14 +0100
commit0a0e0d082f778fca86ab73313c130ef92b5f840d (patch)
treea97a19162e497770449d594ac70c85b469644708 /support
parent2f03d6dc5e1ff6a8f28cba566f56e72bfb9f3fc8 (diff)
downloadPeerTube-0a0e0d082f778fca86ab73313c130ef92b5f840d.tar.gz
PeerTube-0a0e0d082f778fca86ab73313c130ef92b5f840d.tar.zst
PeerTube-0a0e0d082f778fca86ab73313c130ef92b5f840d.zip
Fix docker nginx container if peertube restarts
Diffstat (limited to 'support')
-rw-r--r--support/doc/docker.md4
-rw-r--r--support/docker/production/docker-compose.yml5
2 files changed, 6 insertions, 3 deletions
diff --git a/support/doc/docker.md b/support/doc/docker.md
index 36da94f55..e9315293f 100644
--- a/support/doc/docker.md
+++ b/support/doc/docker.md
@@ -63,8 +63,6 @@ intuited from usage.
63Install the template that the nginx container will use. 63Install the template that the nginx container will use.
64The container will generate the configuration by replacing `${WEBSERVER_HOST}` and `${PEERTUBE_HOST}` using your docker compose env file. 64The container will generate the configuration by replacing `${WEBSERVER_HOST}` and `${PEERTUBE_HOST}` using your docker compose env file.
65 65
66It will also generate a TLS certificate at startup and schedule a renew
67
68```shell 66```shell
69mkdir -p docker-volume/nginx 67mkdir -p docker-volume/nginx
70curl https://raw.githubusercontent.com/Chocobozzz/PeerTube/develop/support/nginx/peertube > docker-volume/nginx/peertube 68curl https://raw.githubusercontent.com/Chocobozzz/PeerTube/develop/support/nginx/peertube > docker-volume/nginx/peertube
@@ -77,7 +75,7 @@ mkdir -p docker-volume/certbot
77docker run -it --rm --name certbot -p 80:80 -v "$(pwd)/docker-volume/certbot/conf:/etc/letsencrypt" certbot/certbot certonly --standalone 75docker run -it --rm --name certbot -p 80:80 -v "$(pwd)/docker-volume/certbot/conf:/etc/letsencrypt" certbot/certbot certonly --standalone
78``` 76```
79 77
80The docker-compose will automatically renew this certificate and reload nginx. 78A dedicated container in the docker-compose will automatically renew this certificate and reload nginx.
81 79
82 80
83#### Test your setup 81#### Test your setup
diff --git a/support/docker/production/docker-compose.yml b/support/docker/production/docker-compose.yml
index 4ad1a8756..e23f31c39 100644
--- a/support/docker/production/docker-compose.yml
+++ b/support/docker/production/docker-compose.yml
@@ -46,6 +46,11 @@ services:
46 # context: . 46 # context: .
47 # dockerfile: ./support/docker/production/Dockerfile.buster 47 # dockerfile: ./support/docker/production/Dockerfile.buster
48 image: chocobozzz/peertube:production-buster 48 image: chocobozzz/peertube:production-buster
49 # Use a static IP for this container because nginx does not handle proxy host change without reload
50 # This container could be restarted on crash or until the postgresql database is ready for connection
51 networks:
52 default:
53 ipv4_address: 172.18.0.42
49 env_file: 54 env_file:
50 - .env 55 - .env
51 # If you provide your own webserver and reverse-proxy, otherwise not suitable for production: 56 # If you provide your own webserver and reverse-proxy, otherwise not suitable for production: