Local changes before sync
Dieser Commit ist enthalten in:
30
v2_nginx/entrypoint.sh
Normale Datei
30
v2_nginx/entrypoint.sh
Normale Datei
@@ -0,0 +1,30 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Nginx im Hintergrund starten
|
||||
nginx
|
||||
|
||||
# Warte bis Nginx läuft
|
||||
sleep 5
|
||||
|
||||
# Versuche Let's Encrypt Zertifikate zu holen (nur in Produktion)
|
||||
if [ "$LETSENCRYPT_ENABLED" = "true" ]; then
|
||||
echo "Requesting Let's Encrypt certificates..."
|
||||
|
||||
# Admin Panel Zertifikat
|
||||
certbot --nginx -d admin-panel-undso.z5m7q9dk3ah2v1plx6ju.com \
|
||||
--non-interactive --agree-tos --email ${LETSENCRYPT_EMAIL} \
|
||||
--redirect --expand --no-eff-email
|
||||
|
||||
# API Server Zertifikat
|
||||
certbot --nginx -d api-software-undso.z5m7q9dk3ah2v1plx6ju.com \
|
||||
--non-interactive --agree-tos --email ${LETSENCRYPT_EMAIL} \
|
||||
--redirect --expand --no-eff-email
|
||||
|
||||
# Auto-renewal einrichten
|
||||
echo "0 0,12 * * * root certbot renew --quiet" >> /etc/crontabs/root
|
||||
crond
|
||||
fi
|
||||
|
||||
# Nginx im Vordergrund halten
|
||||
nginx -s stop
|
||||
nginx -g "daemon off;"
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren