]>
Commit | Line | Data |
---|---|---|
1a9b141d RK |
1 | #!/bin/sh |
2 | set -e | |
3 | ||
b8f3e6b0 RK |
4 | # Process the nginx template |
5 | SOURCE_FILE="/etc/nginx/conf.d/peertube.template" | |
6 | TARGET_FILE="/etc/nginx/conf.d/default.conf" | |
1a9b141d RK |
7 | export WEBSERVER_HOST="default_server" |
8 | export PEERTUBE_HOST="peertube:9000" | |
9 | ||
b8f3e6b0 | 10 | envsubst '${WEBSERVER_HOST} ${PEERTUBE_HOST}' < $SOURCE_FILE > $TARGET_FILE |
1a9b141d | 11 | |
a30995fc | 12 | # Remove HTTPS/SSL from nginx conf since this image is meant as a webserver _behind_ a reverse-proxy doing TLS termination itself |
b8f3e6b0 | 13 | sed -i 's/443 ssl http2/80/g;/ssl_/d' $TARGET_FILE |
1a9b141d | 14 | |
1a9b141d | 15 | nginx -g "daemon off;" |