]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - support/docker/production/entrypoint.nginx.sh
Translated using Weblate (Ukrainian)
[github/Chocobozzz/PeerTube.git] / support / docker / production / entrypoint.nginx.sh
CommitLineData
1a9b141d
RK
1#!/bin/sh
2set -e
3
b8f3e6b0
RK
4# Process the nginx template
5SOURCE_FILE="/etc/nginx/conf.d/peertube.template"
6TARGET_FILE="/etc/nginx/conf.d/default.conf"
afd4ee86 7export WEBSERVER_HOST="$PEERTUBE_WEBSERVER_HOSTNAME"
1a9b141d
RK
8export PEERTUBE_HOST="peertube:9000"
9
b8f3e6b0 10envsubst '${WEBSERVER_HOST} ${PEERTUBE_HOST}' < $SOURCE_FILE > $TARGET_FILE
1a9b141d 11
afd4ee86
C
12while :; do
13 sleep 12h & wait $!;
14 nginx -s reload;
15done &
1a9b141d 16
afd4ee86 17nginx -g 'daemon off;'