mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-12 08:47:40 -05:00
acitivity is back and emergency is highlighted
This commit is contained in:
@@ -24,3 +24,7 @@ COPY *.conf /etc/nginx/
|
||||
|
||||
# Add virtual hosts
|
||||
COPY ${STAGE}/vhosts/ /etc/nginx/conf.d/
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
||||
20
nginx-proxy/entrypoint.sh
Normal file
20
nginx-proxy/entrypoint.sh
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Render the config from template
|
||||
envsubst '$DOMAIN_NAME' < /etc/nginx/conf.d/site.template > /etc/nginx/conf.d/default.conf
|
||||
|
||||
# Test Nginx config
|
||||
nginx -t
|
||||
|
||||
# Background job: reload Nginx every 6 hours to pick up new certs
|
||||
(
|
||||
while true; do
|
||||
sleep 6h
|
||||
echo "[nginx] Reloading config..."
|
||||
nginx -s reload && echo "[nginx] Reload succeeded" || echo "[nginx] Reload failed"
|
||||
done
|
||||
) &
|
||||
|
||||
# Start Nginx in the foreground
|
||||
exec nginx -g 'daemon off;'
|
||||
Reference in New Issue
Block a user