mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-10-17 05:29:23 +02:00
Compare commits
1 Commits
bc3801f290
...
claude/ent
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
00577386d2 |
@@ -1,5 +1,8 @@
|
|||||||
## 4.4.22-7 (04-06-2026)
|
## 4.4.22-7 (04-06-2026)
|
||||||
- Minor bugs fixed
|
- Disable the per-account storage limit by default via the new NO_STORAGE_LIMIT
|
||||||
|
option (default true). Grants every account 100 TB and ~100 years validity,
|
||||||
|
equivalent to `ente admin update-subscription --no-limit`. Set to false to
|
||||||
|
keep Ente's default storage limits.
|
||||||
## 4.4.22-6 (04-06-2026)
|
## 4.4.22-6 (04-06-2026)
|
||||||
- Fix SIGPIPE (exit 141) on startup: tr piped to head -c against /dev/urandom
|
- Fix SIGPIPE (exit 141) on startup: tr piped to head -c against /dev/urandom
|
||||||
now suppresses the expected SIGPIPE under set -o pipefail
|
now suppresses the expected SIGPIPE under set -o pipefail
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ Webui can be found at <http://homeassistant:PORT>.
|
|||||||
|--------|------|---------|-------------|
|
|--------|------|---------|-------------|
|
||||||
| `ENTE_ENDPOINT_URL` | str | `http://homeassistant.local:8280` | The URL where Ente API will be accessible (used by web UI) |
|
| `ENTE_ENDPOINT_URL` | str | `http://homeassistant.local:8280` | The URL where Ente API will be accessible (used by web UI) |
|
||||||
| `DB_PASSWORD` | str | `ente` | Database password for internal PostgreSQL |
|
| `DB_PASSWORD` | str | `ente` | Database password for internal PostgreSQL |
|
||||||
|
| `NO_STORAGE_LIMIT` | bool | `true` | Remove the per-account storage limit (grants every account 100 TB and ~100 years validity, equivalent to `ente admin update-subscription --no-limit`). Set to `false` to keep the default Ente storage limits. |
|
||||||
| `USE_EXTERNAL_DB` | bool | `false` | Use external PostgreSQL database |
|
| `USE_EXTERNAL_DB` | bool | `false` | Use external PostgreSQL database |
|
||||||
| `TZ` | str | `Europe/Paris` | Timezone setting |
|
| `TZ` | str | `Europe/Paris` | Timezone setting |
|
||||||
|
|
||||||
@@ -132,6 +133,10 @@ After starting the addon for the first time:
|
|||||||
The addon exposes the following ports:
|
The addon exposes the following ports:
|
||||||
|
|
||||||
- **8300** (3000/tcp): Ente web UI
|
- **8300** (3000/tcp): Ente web UI
|
||||||
|
- **8301** (3001/tcp): Ente Accounts
|
||||||
|
- **8302** (3002/tcp): Ente Albums
|
||||||
|
- **8303** (3003/tcp): Ente Auth
|
||||||
|
- **8304** (3004/tcp): Ente Cast
|
||||||
- **8305** (3005/tcp): Ente Share
|
- **8305** (3005/tcp): Ente Share
|
||||||
- **8306** (3006/tcp): Ente Embed
|
- **8306** (3006/tcp): Ente Embed
|
||||||
- **8307** (3007/tcp): Ente Paste
|
- **8307** (3007/tcp): Ente Paste
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ options:
|
|||||||
env_vars: []
|
env_vars: []
|
||||||
DB_PASSWORD: ente
|
DB_PASSWORD: ente
|
||||||
ENTE_ENDPOINT_URL: http://homeassistant.local:8280
|
ENTE_ENDPOINT_URL: http://homeassistant.local:8280
|
||||||
|
NO_STORAGE_LIMIT: true
|
||||||
TZ: Europe/Paris
|
TZ: Europe/Paris
|
||||||
USE_EXTERNAL_DB: false
|
USE_EXTERNAL_DB: false
|
||||||
ports:
|
ports:
|
||||||
@@ -121,6 +122,7 @@ schema:
|
|||||||
DB_PORT: int?
|
DB_PORT: int?
|
||||||
DB_USERNAME: str?
|
DB_USERNAME: str?
|
||||||
ENTE_ENDPOINT_URL: str
|
ENTE_ENDPOINT_URL: str
|
||||||
|
NO_STORAGE_LIMIT: bool?
|
||||||
TZ: str?
|
TZ: str?
|
||||||
USE_EXTERNAL_DB: bool?
|
USE_EXTERNAL_DB: bool?
|
||||||
cifsdomain: str?
|
cifsdomain: str?
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#!/usr/bin/env bashio
|
#!/usr/bin/env bashio
|
||||||
# shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
# Internal MinIO credentials (not user-configurable; MinIO is 127.0.0.1 only)
|
# Internal MinIO credentials (not user-configurable; MinIO is 127.0.0.1 only)
|
||||||
MINIO_CRED_FILE="/config/minio-creds"
|
MINIO_CRED_FILE="/config/minio-creds"
|
||||||
@@ -9,14 +10,14 @@ if [ -f "$MINIO_CRED_FILE" ]; then
|
|||||||
MINIO_PASS="$(sed -n '2p' "$MINIO_CRED_FILE")"
|
MINIO_PASS="$(sed -n '2p' "$MINIO_CRED_FILE")"
|
||||||
# Regenerate if file is corrupted
|
# Regenerate if file is corrupted
|
||||||
if [ -z "$MINIO_USER" ] || [ -z "$MINIO_PASS" ]; then
|
if [ -z "$MINIO_USER" ] || [ -z "$MINIO_PASS" ]; then
|
||||||
MINIO_USER="minio_$(head -c 4 /dev/urandom | od -An -tx1 | tr -d ' \n')"
|
MINIO_USER="minio_$(tr -dc 'a-zA-Z0-9' < /dev/urandom | head -c 8 || true)"
|
||||||
MINIO_PASS="$(head -c 24 /dev/urandom | base64 | tr -d '\n')"
|
MINIO_PASS="$(head -c 24 /dev/urandom | base64 | tr -d '\n')"
|
||||||
printf '%s\n%s\n' "$MINIO_USER" "$MINIO_PASS" > "$MINIO_CRED_FILE"
|
printf '%s\n%s\n' "$MINIO_USER" "$MINIO_PASS" > "$MINIO_CRED_FILE"
|
||||||
chmod 600 "$MINIO_CRED_FILE"
|
chmod 600 "$MINIO_CRED_FILE"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# Generate random credentials on first run
|
# Generate random credentials on first run
|
||||||
MINIO_USER="minio_$(head -c 4 /dev/urandom | od -An -tx1 | tr -d ' \n')"
|
MINIO_USER="minio_$(tr -dc 'a-zA-Z0-9' < /dev/urandom | head -c 8 || true)"
|
||||||
MINIO_PASS="$(head -c 24 /dev/urandom | base64 | tr -d '\n')"
|
MINIO_PASS="$(head -c 24 /dev/urandom | base64 | tr -d '\n')"
|
||||||
printf '%s\n%s\n' "$MINIO_USER" "$MINIO_PASS" > "$MINIO_CRED_FILE"
|
printf '%s\n%s\n' "$MINIO_USER" "$MINIO_PASS" > "$MINIO_CRED_FILE"
|
||||||
chmod 600 "$MINIO_CRED_FILE"
|
chmod 600 "$MINIO_CRED_FILE"
|
||||||
@@ -61,6 +62,13 @@ else
|
|||||||
bashio::log.info "Using internal Postgres."
|
bashio::log.info "Using internal Postgres."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Disable per-account storage limits by default (mirrors `ente admin
|
||||||
|
# update-subscription --no-limit`). Set NO_STORAGE_LIMIT=false to keep limits.
|
||||||
|
NO_STORAGE_LIMIT=true
|
||||||
|
if bashio::config.false 'NO_STORAGE_LIMIT'; then
|
||||||
|
NO_STORAGE_LIMIT=false
|
||||||
|
fi
|
||||||
|
|
||||||
# Active DB connection target (may be overridden below)
|
# Active DB connection target (may be overridden below)
|
||||||
if $USE_EXTERNAL_DB; then
|
if $USE_EXTERNAL_DB; then
|
||||||
DB_HOST="$DB_HOST_EXT"
|
DB_HOST="$DB_HOST_EXT"
|
||||||
@@ -245,6 +253,43 @@ start_web() {
|
|||||||
WEB_PID=$!
|
WEB_PID=$!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
############################################
|
||||||
|
# Storage limit (no-limit) reconcile
|
||||||
|
############################################
|
||||||
|
# Equivalent of `ente admin update-subscription --no-limit`: grant every
|
||||||
|
# account 100 TB of storage and ~100 years of validity. The Ente CLI only
|
||||||
|
# supports this per-user and interactively, so to make it the default for all
|
||||||
|
# current and future accounts we reconcile the museum `subscriptions` table
|
||||||
|
# directly (the method documented by the Ente maintainers). Runs in the
|
||||||
|
# background and re-applies periodically so newly registered users are covered.
|
||||||
|
NO_LIMIT_STORAGE_BYTES=109951162777600 # 100 * 1024^4 (100 TiB)
|
||||||
|
NO_LIMIT_EXPIRY_SQL="(extract(epoch from now() + interval '100 years') * 1000000)::bigint"
|
||||||
|
|
||||||
|
reconcile_no_limit() {
|
||||||
|
export PGPASSWORD="$DB_PASS"
|
||||||
|
while true; do
|
||||||
|
# Storage is the limit that actually enforces quota; apply it first and
|
||||||
|
# independently so a schema change to other columns can't block it.
|
||||||
|
psql -h "$DB_HOST" -p "$DB_PORT" -U "$DB_USER" -d "$DB_NAME" \
|
||||||
|
-c "UPDATE subscriptions SET storage = ${NO_LIMIT_STORAGE_BYTES} WHERE storage < ${NO_LIMIT_STORAGE_BYTES};" \
|
||||||
|
> /dev/null 2>&1 || true
|
||||||
|
psql -h "$DB_HOST" -p "$DB_PORT" -U "$DB_USER" -d "$DB_NAME" \
|
||||||
|
-c "UPDATE subscriptions SET expiry_time = ${NO_LIMIT_EXPIRY_SQL} WHERE expiry_time < ${NO_LIMIT_EXPIRY_SQL};" \
|
||||||
|
> /dev/null 2>&1 || true
|
||||||
|
sleep 60
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
start_no_limit_reconcile() {
|
||||||
|
if ! $NO_STORAGE_LIMIT; then
|
||||||
|
bashio::log.info "NO_STORAGE_LIMIT disabled; per-account storage limits stay in effect."
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
bashio::log.info "NO_STORAGE_LIMIT enabled; granting unlimited storage to all accounts."
|
||||||
|
reconcile_no_limit &
|
||||||
|
NO_LIMIT_PID=$!
|
||||||
|
}
|
||||||
|
|
||||||
############################################
|
############################################
|
||||||
# Museum (API)
|
# Museum (API)
|
||||||
############################################
|
############################################
|
||||||
@@ -295,5 +340,7 @@ wait_minio_ready_and_bucket
|
|||||||
|
|
||||||
start_web
|
start_web
|
||||||
|
|
||||||
|
start_no_limit_reconcile
|
||||||
|
|
||||||
# Foreground — keeps container alive
|
# Foreground — keeps container alive
|
||||||
start_museum_foreground
|
start_museum_foreground
|
||||||
|
|||||||
Reference in New Issue
Block a user