nginx enable/disable flag.

This commit is contained in:
Greyscale 2023-03-02 17:13:59 +01:00
parent 1ba90728c4
commit c580ecf331
No known key found for this signature in database
GPG key ID: 74BAFF55434DA4B2
2 changed files with 9 additions and 0 deletions

View file

@ -12,6 +12,7 @@ RUN apt-get update -qq && \
apt-get autoremove -yqq && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /var/lib/dpkg/status.old /var/cache/debconf/templates.dat /var/log/dpkg.log /var/log/lastlog /var/log/apt/*.log
COPY nginx.runit /etc/service/nginx/run
COPY laravel.runit /etc/service/laravel/run
COPY laravel-horizon.runit /etc/service/horizon/run
COPY laravel-horizon.finish /etc/service/horizon/finish

8
laravel/nginx.runit Executable file
View file

@ -0,0 +1,8 @@
#!/usr/bin/env bash
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