Docker-PHP/laravel/nginx.runit

17 lines
441 B
Text
Raw Normal View History

2023-03-02 16:13:59 +00:00
#!/usr/bin/env bash
2023-05-14 22:06:48 +00:00
if [ -z "${SSL_CERTIFICATE}" ]; then
echo "No certificate set, using defaults"
else
echo "Setting /certs/example.crt and /certs/example.key"
2023-05-18 15:08:16 +00:00
echo "${SSL_CERTIFICATE}" > /certs/example.crt
2023-05-14 22:06:48 +00:00
echo "${SSL_CERTIFICATE_KEY}" > /certs/example.key
fi
2023-03-02 16:13:59 +00:00
if [ "${HTTP_ENABLE,,}" = "on" ]; then
echo "[NGINX] Starting Nginx"
/usr/sbin/nginx
else
echo "[NGINX] HTTP_ENABLE not set, Nginx not running"
sleep infinity
fi