#!/bin/sh # Use envsubst to replace environment variables in nginx.conf.template and output to nginx.conf envsubst '$BACKEND_ADDRESS,$BACKEND_PORT' < /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf # Start nginx in the foreground exec nginx -g 'daemon off;'