Enable Ente CLI persistence and update docs

This commit is contained in:
2025-10-30 11:17:11 -06:00
parent 66c3625633
commit a2810a720f
5 changed files with 43 additions and 41 deletions

View File

@@ -54,11 +54,6 @@ APP_FQDN="${CLOUDRON_APP_DOMAIN:-${CLOUDRON_APP_FQDN:-localhost}}"
BASE_URL="${CLOUDRON_APP_ORIGIN:-https://$APP_FQDN}"
BASE_URL="${BASE_URL%/}"
ROOT_DOMAIN="$APP_FQDN"
if [ "$APP_FQDN" != "localhost" ] && expr "$APP_FQDN" : '.*\..*' >/dev/null; then
ROOT_DOMAIN="${APP_FQDN#*.}"
fi
PHOTOS_HOST="$APP_FQDN"
ACCOUNTS_HOST="$APP_FQDN"
AUTH_HOST="$APP_FQDN"
@@ -67,12 +62,12 @@ ALBUMS_HOST="$APP_FQDN"
FAMILY_HOST="$APP_FQDN"
USE_SUBDOMAIN_ROUTING=false
if [ "$APP_FQDN" != "localhost" ] && [ "$ROOT_DOMAIN" != "$APP_FQDN" ]; then
ACCOUNTS_HOST="accounts.${ROOT_DOMAIN}"
AUTH_HOST="auth.${ROOT_DOMAIN}"
CAST_HOST="cast.${ROOT_DOMAIN}"
ALBUMS_HOST="albums.${ROOT_DOMAIN}"
FAMILY_HOST="family.${ROOT_DOMAIN}"
if [ "$APP_FQDN" != "localhost" ]; then
ACCOUNTS_HOST="accounts.${APP_FQDN}"
AUTH_HOST="auth.${APP_FQDN}"
CAST_HOST="cast.${APP_FQDN}"
ALBUMS_HOST="albums.${APP_FQDN}"
FAMILY_HOST="family.${APP_FQDN}"
USE_SUBDOMAIN_ROUTING=true
fi
@@ -546,6 +541,13 @@ cat > "$CADDY_CONFIG" <<EOF_CADDY
log {
level INFO
output stdout
format filter {
wrap json
fields {
request>remote_ip replace {http.request.header.X-Real-Ip}
request>headers>X-Real-Ip delete
}
}
}
encode gzip
@@ -575,6 +577,7 @@ cat > "$CADDY_CONFIG" <<EOF_CADDY
defer
}
reverse_proxy localhost:8080 {
trusted_proxies private_ranges
header_up Host {http.request.host}
header_up X-Real-IP {http.request.header.X-Forwarded-For}
header_up X-Forwarded-For {http.request.header.X-Forwarded-For}
@@ -663,6 +666,13 @@ cat > "$CADDY_CONFIG" <<EOF_CADDY
log {
level INFO
output stdout
format filter {
wrap json
fields {
request>remote_ip replace {http.request.header.X-Real-Ip}
request>headers>X-Real-Ip delete
}
}
}
encode gzip
@@ -692,6 +702,7 @@ cat > "$CADDY_CONFIG" <<EOF_CADDY
defer
}
reverse_proxy localhost:8080 {
trusted_proxies private_ranges
header_up Host {http.request.host}
header_up X-Real-IP {http.request.header.X-Forwarded-For}
header_up X-Forwarded-For {http.request.header.X-Forwarded-For}