mirror of
https://github.com/2martens/cloud-configuration.git
synced 2026-10-17 16:46:51 +02:00
16 lines
641 B
Bash
16 lines
641 B
Bash
#!/bin/sh
|
|
|
|
CERT_PATH="/etc/letsencrypt/live/api.2martens.de/fullchain.pem"
|
|
KEY_PATH="/etc/letsencrypt/live/api.2martens.de/privkey.pem"
|
|
NGINX_CONF="/etc/nginx/nginx.conf"
|
|
|
|
if [ -f "$CERT_PATH" ] && [ -f "$KEY_PATH" ]; then
|
|
echo "✅ Real certificate found — starting full HTTPS Nginx"
|
|
cp -f /etc/nginx/certificates-available.d/letsencrypt.conf /etc/nginx/certificates-enabled.d/certificates.conf
|
|
else
|
|
echo "⚠️ No certificate found — starting Nginx with self-signed TLS fallback"
|
|
cp -f /etc/nginx/certificates-available.d/selfsigned.conf /etc/nginx/certificates-enabled.d/certificates.conf
|
|
fi
|
|
|
|
exec /docker-entrypoint.sh "$@"
|