diff --git a/BUILD-INSTRUCTIONS.md b/BUILD-INSTRUCTIONS.md index 4f154fe..bb7d3fc 100644 --- a/BUILD-INSTRUCTIONS.md +++ b/BUILD-INSTRUCTIONS.md @@ -9,14 +9,14 @@ cloudron build \ --set-build-service builder.docker.due.ren \ --build-service-token e3265de06b1d0e7bb38400539012a8433a74c2c96a17955e \ --set-repository andreasdueren/ente-cloudron \ - --tag 0.5.1 + --tag 0.5.2 ``` ## Install ```bash cloudron install \ --location ente.due.ren \ - --image andreasdueren/ente-cloudron:0.5.1 + --image andreasdueren/ente-cloudron:0.5.2 ``` ## After Install diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c361af..46105e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ * Fix `httpPorts` host detection so accounts/cast/family/albums subdomains serve their static frontends again +## 0.5.2 (2025-11-05) + +* Allow httpPort hostnames like `cast.ente`/`accounts.ente` so Cloudron can append the primary domain (`.due.ren`) automatically + ## 0.5.0 (2025-11-04) * Proxy Museum GET/HEAD routes (e.g. `/collections`, `/files`, `/remote-store`) so clients that talk to the primary host without `/api` still hit the backend diff --git a/CloudronManifest.json b/CloudronManifest.json index 30b53f3..f4d206a 100644 --- a/CloudronManifest.json +++ b/CloudronManifest.json @@ -7,7 +7,7 @@ "contactEmail": "contact@ente.io", "website": "https://ente.io", "tagline": "Open source, end-to-end encrypted photo backup", - "version": "0.5.1", + "version": "0.5.2", "upstreamVersion": "git-main", "healthCheckPath": "/health", "httpPort": 3080, diff --git a/start.sh b/start.sh index 451dbda..83cbb7d 100755 --- a/start.sh +++ b/start.sh @@ -108,6 +108,25 @@ CAST_HOST="$(resolve_http_hostname "CAST_DOMAIN" "cast.${APP_FQDN}")" ALBUMS_HOST="$(resolve_http_hostname "ALBUMS_DOMAIN" "albums.${APP_FQDN}")" FAMILY_HOST="$(resolve_http_hostname "FAMILY_DOMAIN" "family.${APP_FQDN}")" +normalize_host() { + local host="$1" + # Replace trailing shared domain with the app domain if present (allows values like cast.ente) + case "$host" in + *".${APP_FQDN#*.}") + printf '%s\n' "${host%.*}.${APP_FQDN#*.}" + ;; + *) + printf '%s\n' "$host" + ;; + esac +} + +ACCOUNTS_HOST="$(normalize_host "$ACCOUNTS_HOST")" +AUTH_HOST="$(normalize_host "$AUTH_HOST")" +CAST_HOST="$(normalize_host "$CAST_HOST")" +ALBUMS_HOST="$(normalize_host "$ALBUMS_HOST")" +FAMILY_HOST="$(normalize_host "$FAMILY_HOST")" + USE_SUBDOMAIN_ROUTING=false if [ "$APP_FQDN" != "localhost" ]; then if [ "$PHOTOS_HOST" != "$APP_FQDN" ] || [ "$ACCOUNTS_HOST" != "$APP_FQDN" ] || [ "$AUTH_HOST" != "$APP_FQDN" ] || [ "$CAST_HOST" != "$APP_FQDN" ] || [ "$ALBUMS_HOST" != "$APP_FQDN" ] || [ "$FAMILY_HOST" != "$APP_FQDN" ]; then