feat(nginx): add nginx + functionality to toggle between letsencrypt, custom-ssl and http-only modes in .env file
This commit is contained in:
10
run.sh
10
run.sh
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
GREEN='\033[0;32m'
|
||||
@@ -42,7 +41,7 @@ echo "[STEP] Checking swap configuration..."
|
||||
./scripts/setup-swap.sh || true
|
||||
|
||||
echo ""
|
||||
echo "[STEP] Preparing SSL certificates (if HTTPS enabled)..."
|
||||
echo "[STEP] Preparing SSL / Nginx configuration..."
|
||||
./scripts/setup-ssl.sh || true
|
||||
|
||||
echo ""
|
||||
@@ -62,6 +61,13 @@ do
|
||||
sleep 5
|
||||
done
|
||||
|
||||
# If letsencrypt mode, provision certs now that Nginx is running
|
||||
if [[ "$SSL_MODE" == "letsencrypt" ]]; then
|
||||
echo ""
|
||||
echo "[STEP] Provisioning Let's Encrypt certificate..."
|
||||
./scripts/setup-letsencrypt.sh
|
||||
fi
|
||||
|
||||
echo "[STEP] Creating admin user..."
|
||||
docker exec -u git gitea-server gitea admin user create \
|
||||
--username "$GITEA_ROOT_USER" \
|
||||
|
||||
Reference in New Issue
Block a user