2020-03-02 17:29:52 -06:00
|
|
|
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
|
2020-06-22 06:06:54 -05:00
|
|
|
# Process the nginx template
|
|
|
|
SOURCE_FILE="/etc/nginx/conf.d/peertube.template"
|
|
|
|
TARGET_FILE="/etc/nginx/conf.d/default.conf"
|
2020-03-02 17:29:52 -06:00
|
|
|
export WEBSERVER_HOST="default_server"
|
|
|
|
export PEERTUBE_HOST="peertube:9000"
|
|
|
|
|
2020-06-22 06:06:54 -05:00
|
|
|
envsubst '${WEBSERVER_HOST} ${PEERTUBE_HOST}' < $SOURCE_FILE > $TARGET_FILE
|
2020-03-02 17:29:52 -06:00
|
|
|
|
2020-11-11 05:55:13 -06:00
|
|
|
# Remove HTTPS/SSL from nginx conf since this image is meant as a webserver _behind_ a reverse-proxy doing TLS termination itself
|
2020-06-22 06:06:54 -05:00
|
|
|
sed -i 's/443 ssl http2/80/g;/ssl_/d' $TARGET_FILE
|
2020-03-02 17:29:52 -06:00
|
|
|
|
|
|
|
nginx -g "daemon off;"
|