1
0
Fork 0
peertube/support/docker/production/entrypoint.nginx.sh
Rigel Kent 1a9b141d83
Add nginx behind traefik in docker-compose + image updates
- support/docker/production/docker-compose.yml: addition of a nginx
image reusing support/nginx/peertube nginx conf to improve performance,
and lessen setup differences between the docker-compose install and the
typical production install.
- support/docker/production/docker-compose.yml: postgres 10 -> postgres
12, redis 4 -> redis 5. Postgres major updates implies manual upgrade.
- support/nginx/peertube: HTTP -> HTTPS redirection is now commented
by default, to allow its reuse in support/docker/production/docker-compose.yml.
2020-11-11 16:45:46 +01:00

17 lines
No EOL
389 B
Bash

#!/bin/sh
set -e
# Process nginx template
SOURCE="/etc/nginx/conf.d/peertube.template"
TARGET="/etc/nginx/conf.d/default.conf"
export WEBSERVER_HOST="default_server"
export PEERTUBE_HOST="peertube:9000"
envsubst '${WEBSERVER_HOST} ${PEERTUBE_HOST}' < $SOURCE > $TARGET
# Remove HTTPS/SSL from nginx conf
sed -i 's/443 ssl http2/80/g;/ssl_/d' $TARGET
cat $TARGET
nginx -g "daemon off;"