All checks were successful
Chore App Build, Test, and Push Docker Images / build-and-push (push) Successful in 2m45s
19 lines
437 B
Bash
19 lines
437 B
Bash
#!/bin/sh
|
|
set -eu
|
|
|
|
backend_host="${BACKEND_HOST:-chore-app-backend}"
|
|
ssl_enabled="$(printf '%s' "${FRONTEND_SSL_ENABLED:-true}" | tr '[:upper:]' '[:lower:]')"
|
|
|
|
template_file="/etc/nginx/nginx.http.conf.template"
|
|
|
|
case "$ssl_enabled" in
|
|
1|true|yes|on)
|
|
template_file="/etc/nginx/nginx.conf.template"
|
|
;;
|
|
esac
|
|
|
|
sed "s|\$BACKEND_HOST|${backend_host}|g" "$template_file" > /etc/nginx/nginx.conf
|
|
|
|
nginx -t
|
|
exec nginx -g 'daemon off;'
|