AzuraCast/util/docker/web/service.full/nginx/run

26 lines
500 B
Bash

#!/bin/bash
sv -w 30 check php-fpm || exit 1
bool() {
case "$1" in
Y* | y* | true | TRUE | 1) return 0 ;;
esac
return 1
}
ENABLE_REDIS=${ENABLE_REDIS:-false}
if bool "$ENABLE_REDIS"; then
ENABLE_REDIS=true
else
ENABLE_REDIS=false
fi
export ENABLE_REDIS
# Copy the nginx template to its destination.
dockerize -template "/etc/nginx/nginx.conf.tmpl:/etc/nginx/nginx.conf" \
-template "/etc/nginx/azuracast.conf.tmpl:/etc/nginx/sites-available/default"
exec nginx -g "daemon off;"