feat: Update Sablier configs for debian hostname and reorganize .env.example
- Change Traefik configs to use ${SERVER_HOSTNAME} placeholder (defaults to debian)
- Update ez-homelab.sh to replace SERVER_HOSTNAME in config templates
- Set Sablier session duration to 5m for testing (increase to 30m for production)
- Add SERVER_HOSTNAME prompt and saving in setup script
- Reorganize .env.example with better structure and SMTP variables
- Add production guidance comments to docker-compose files
- Intentional SMTP variable redundancy for service flexibility
This commit is contained in:
@@ -55,6 +55,7 @@ load_env_file() {
|
||||
echo "Current configuration:"
|
||||
echo " Domain: ${DOMAIN:-Not set}"
|
||||
echo " Server IP: ${SERVER_IP:-Not set}"
|
||||
echo " Server Hostname: ${SERVER_HOSTNAME:-Not set}"
|
||||
echo " Admin User: ${AUTHELIA_ADMIN_USER:-Not set}"
|
||||
echo " Admin Email: ${AUTHELIA_ADMIN_EMAIL:-Not set}"
|
||||
echo " Timezone: ${TZ:-Not set}"
|
||||
@@ -79,6 +80,7 @@ save_env_file() {
|
||||
# Update values
|
||||
sed -i "s%DOMAIN=.*%DOMAIN=$DOMAIN%" "$REPO_DIR/.env"
|
||||
sed -i "s%SERVER_IP=.*%SERVER_IP=$SERVER_IP%" "$REPO_DIR/.env"
|
||||
sed -i "s%SERVER_HOSTNAME=.*%SERVER_HOSTNAME=$SERVER_HOSTNAME%" "$REPO_DIR/.env"
|
||||
sed -i "s%TZ=.*%TZ=$TZ%" "$REPO_DIR/.env"
|
||||
|
||||
# Authelia settings (only if deploying core)
|
||||
@@ -165,6 +167,13 @@ prompt_for_values() {
|
||||
[ -n "$input" ] && SERVER_IP="$input"
|
||||
fi
|
||||
|
||||
# Server Hostname
|
||||
if [ -z "$SERVER_HOSTNAME" ]; then
|
||||
SERVER_HOSTNAME="debian"
|
||||
fi
|
||||
read -p "Server hostname [$SERVER_HOSTNAME] (press Enter to keep current): " input
|
||||
[ -n "$input" ] && SERVER_HOSTNAME="$input"
|
||||
|
||||
# Timezone
|
||||
if [ -z "$TZ" ]; then
|
||||
TZ="America/New_York"
|
||||
@@ -369,6 +378,7 @@ perform_deployment() {
|
||||
|
||||
# Replace domain placeholders in traefik dynamic configs
|
||||
find /opt/stacks/core/traefik/dynamic -name "*.yml" -exec sed -i "s/\${DOMAIN}/${DOMAIN}/g" {} \;
|
||||
find /opt/stacks/core/traefik/dynamic -name "*.yml" -exec sed -i "s/\${SERVER_HOSTNAME}/${SERVER_HOSTNAME}/g" {} \;
|
||||
|
||||
if [ -d "/opt/stacks/core/authelia" ]; then
|
||||
mv /opt/stacks/core/authelia /opt/stacks/core/authelia.backup.$(date +%Y%m%d_%H%M%S)
|
||||
|
||||
Reference in New Issue
Block a user