lan-to-nginx/docker-entrypoint.sh

15 lines
510 B
Bash

#!/bin/sh
# Default to HTTP if PROTOCOL is not set
PROTOCOL="${PROTOCOL:-http}"
# Replace placeholders with environment variable values
envsubst '$BACKEND_ADDRESS $BACKEND_PORT $PROTOCOL $MATOMO_URL $MATOMO_SITE_ID' < /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf
# Start nginx in the foreground
curl -k -I $PROTOCOL://$BACKEND_ADDRESS:$BACKEND_PORT
echo checking nginx modules
nginx -V 2>&1 | grep -o http_sub_module
echo /etc/nginx/nginx.conf
cat /etc/nginx/nginx.conf
exec nginx -g 'daemon off;'