snikket-web-proxy/entrypoint.sh

16 lines
575 B
Bash
Raw Normal View History

2020-11-05 15:35:56 +00:00
#!/bin/bash
CERT_PATH="/snikket/letsencrypt/live/$SNIKKET_DOMAIN/cert.pem"
if test -f "$CERT_PATH"; then
## Certs already exist - render and deploy configs
2021-01-29 16:20:55 +00:00
/usr/local/bin/render-template.sh "/etc/nginx/templates/snikket-common" "/etc/nginx/snippets/snikket-common.conf"
2020-11-05 15:35:56 +00:00
for proto in http https; do
2021-01-29 16:20:55 +00:00
/usr/local/bin/render-template.sh "/etc/nginx/templates/$proto" "/etc/nginx/sites-enabled/$proto";
2020-11-05 15:35:56 +00:00
done
else
/usr/local/bin/render-template.sh "/etc/nginx/templates/startup" "/etc/nginx/sites-enabled/startup";
2020-11-05 15:35:56 +00:00
fi
exec supervisord -c /etc/supervisord/supervisord.conf