From afd4ee86ddb97f8d49585fddd318bedcd3ad55b8 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 30 Dec 2020 16:53:11 +0100 Subject: Remove traefik docker support --- support/doc/docker.md | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) (limited to 'support/doc/docker.md') diff --git a/support/doc/docker.md b/support/doc/docker.md index 6f61c38d0..36da94f55 100644 --- a/support/doc/docker.md +++ b/support/doc/docker.md @@ -56,14 +56,33 @@ Other environment variables are used in [/support/docker/production/config/custom-environment-variables.yaml](https://github.com/Chocobozzz/PeerTube/blob/develop/support/docker/production/config/custom-environment-variables.yaml) and can be intuited from usage. -#### Testing local Docker setup +#### Webserver -To test locally your Docker setup, you must add your domain (``) in `/etc/hosts`: +*The docker compose file includes a configured web server. You can skip this part and comment the appropriate section in the docker compose if you use another webserver/proxy.* + +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 ``` -127.0.0.1 localhost mydomain.tld + +You need to manually generate the first SSL/TLS certificate using Let's Encrypt: + +```shell +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 ``` -#### You can use the regular `up` command to set it up +The docker-compose will automatically renew this certificate and reload nginx. + + +#### Test your setup + +Run your containers: ```shell docker-compose up -- cgit v1.2.3