fix(lubelogger): add 1.7.4 upgrade package

Keep 1.7.3 available for existing installs and add 1.7.4 with the updated pinned image. The isolated 1Panel v2 1.7.3 to 1.7.4 upgrade, restart, and uninstall smoke passed.
This commit is contained in:
okxlin
2026-10-18 21:30:52 +08:00
parent 887e12215f
commit d765464a0c
8 changed files with 269 additions and 1 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
services:
lubelogger:
image: "ghcr.io/hargata/lubelogger:v1.7.4@sha256:483a9d7582c4e6258615fd822b3de4193b4fcc4230d0a92432c6d407faf75af2"
image: "ghcr.io/hargata/lubelogger:v1.7.3@sha256:c9d2bbb48c7f84d90e54496e2cd60422e56a5f2345c8a539ebe09f77e629d321"
container_name: ${CONTAINER_NAME}
restart: unless-stopped
init: true
+6
View File
@@ -0,0 +1,6 @@
PANEL_APP_PORT_HTTP=8080
LUBELOGGER_ROOT_USERNAME=admin
LUBELOGGER_ROOT_PASSWORD=LubeLogger_Admin_2026!
TIME_ZONE=Etc/UTC
APP_DATA_DIR=./data
CONTAINER_NAME=
+86
View File
@@ -0,0 +1,86 @@
additionalProperties:
formFields:
- default: 8080
edit: true
envKey: PANEL_APP_PORT_HTTP
labelEn: Port
labelZh: 端口
label:
en: Port
zh: 端口
zh-Hant: 埠
ja: ポート
ko: 포트
ru: Порт
ms: Port
pt-br: Porta
required: true
rule: paramPort
type: number
- default: admin
edit: true
envKey: LUBELOGGER_ROOT_USERNAME
labelEn: Root Username
labelZh: 根管理员用户名
label:
en: Root Username
zh: 根管理员用户名
zh-Hant: 根管理員使用者名稱
ja: ルート管理者ユーザー名
ko: 루트 관리자 사용자 이름
ru: Имя корневого администратора
ms: Nama Pengguna Pentadbir Root
pt-br: Nome do Administrador Raiz
required: true
rule: paramCommon
type: text
- default: LubeLogger_Admin_2026!
edit: true
envKey: LUBELOGGER_ROOT_PASSWORD
labelEn: Root Password
labelZh: 根管理员密码
label:
en: Root Password
zh: 根管理员密码
zh-Hant: 根管理員密碼
ja: ルート管理者パスワード
ko: 루트 관리자 비밀번호
ru: Пароль корневого администратора
ms: Kata Laluan Pentadbir Root
pt-br: Senha do Administrador Raiz
random: true
required: true
rule: paramComplexity
type: password
- default: Etc/UTC
edit: true
envKey: TIME_ZONE
labelEn: Time Zone
labelZh: 时区
label:
en: Time Zone
zh: 时区
zh-Hant: 時區
ja: タイムゾーン
ko: 시간대
ru: Часовой пояс
ms: Zon Masa
pt-br: Fuso Horario
required: true
type: text
- default: ./data
edit: true
envKey: APP_DATA_DIR
labelEn: Data Directory
labelZh: 数据目录
label:
en: Data Directory
zh: 数据目录
zh-Hant: 資料目錄
ja: データディレクトリ
ko: 데이터 디렉터리
ru: Каталог данных
ms: Direktori Data
pt-br: Diretorio de Dados
required: true
type: text
+1
View File
@@ -0,0 +1 @@
+46
View File
@@ -0,0 +1,46 @@
services:
lubelogger:
image: "ghcr.io/hargata/lubelogger:v1.7.4@sha256:483a9d7582c4e6258615fd822b3de4193b4fcc4230d0a92432c6d407faf75af2"
container_name: ${CONTAINER_NAME}
restart: unless-stopped
init: true
user: "1000:1000"
networks:
- 1panel-network
ports:
- "${PANEL_APP_PORT_HTTP}:8080"
env_file:
- path: "${APP_DATA_DIR}/.lubelogger-auth.env"
required: false
environment:
- HOME=/App/data
- TZ=${TIME_ZONE}
- ASPNETCORE_HTTP_PORTS=8080
- Kestrel__EndpointDefaults__Protocols=Http1
- DOTNET_SYSTEM_NET_HTTP_SOCKETSHTTPHANDLER_HTTP2SUPPORT=false
- LUBELOGGER_LOCALE_OVERRIDE=en_US
- LUBELOGGER_LOCALE_DT_OVERRIDE=en_US
read_only: true
tmpfs:
- /tmp:size=64m,mode=1777
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
healthcheck:
test:
- CMD-SHELL
- >-
bash -lc 'exec 3<>/dev/tcp/127.0.0.1/8080; exec 3>&-; exec 3<&-'
interval: 30s
timeout: 5s
start_period: 15s
retries: 3
volumes:
- "${APP_DATA_DIR}:/App/data"
labels:
createdBy: "Apps"
networks:
1panel-network:
external: true
+123
View File
@@ -0,0 +1,123 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)"
ENV_FILE="${ENV_FILE:-$ROOT_DIR/.env}"
read_env_value() {
local key="$1"
[[ -f "$ENV_FILE" ]] || return 0
local value
value="$(sed -n "s/^${key}=//p" "$ENV_FILE" | tail -n 1)"
case "$value" in
\"*\") value="${value#\"}"; value="${value%\"}" ;;
\'*\') value="${value#\'}"; value="${value%\'}" ;;
esac
printf '%s\n' "$value"
}
configured_value() {
local key="$1"
local default_value="$2"
local value="${!key:-}"
if [[ -z "$value" ]]; then
value="$(read_env_value "$key")"
fi
printf '%s\n' "${value:-$default_value}"
}
reject_control_characters() {
local name="$1"
local value="$2"
if [[ "$value" == *$'\n'* || "$value" == *$'\r'* ]]; then
printf '%s must not contain line breaks\n' "$name" >&2
exit 1
fi
}
prepare_lubelogger() {
local raw path username password username_hash password_hash auth_file temp_file
raw="$(configured_value APP_DATA_DIR ./data)"
username="$(configured_value LUBELOGGER_ROOT_USERNAME admin)"
password="$(configured_value LUBELOGGER_ROOT_PASSWORD '')"
[[ -n "$raw" ]] || {
printf '%s\n' 'APP_DATA_DIR must not be empty' >&2
exit 1
}
if [[ "$raw" = /* ]]; then
printf '%s\n' 'APP_DATA_DIR must be relative to the application version directory' >&2
exit 1
fi
path="$(realpath -m -- "$ROOT_DIR/${raw#./}")"
case "$path" in
"$ROOT_DIR"/*) ;;
*)
printf '%s\n' 'APP_DATA_DIR must remain inside the application version directory' >&2
exit 1
;;
esac
install -d -m 0750 "$path"
path="$(realpath -e -- "$path")"
case "$path" in
"$ROOT_DIR"/*) ;;
*)
printf '%s\n' 'APP_DATA_DIR resolves outside the application version directory' >&2
exit 1
;;
esac
[[ -n "$username" && ${#username} -le 128 ]] || {
printf '%s\n' 'LUBELOGGER_ROOT_USERNAME must contain 1 to 128 characters' >&2
exit 1
}
[[ ${#password} -ge 12 && ${#password} -le 256 ]] || {
printf '%s\n' 'LUBELOGGER_ROOT_PASSWORD must contain 12 to 256 characters' >&2
exit 1
}
reject_control_characters LUBELOGGER_ROOT_USERNAME "$username"
reject_control_characters LUBELOGGER_ROOT_PASSWORD "$password"
username_hash="$(printf '%s' "$username" | sha256sum | cut -d ' ' -f 1)"
password_hash="$(printf '%s' "$password" | sha256sum | cut -d ' ' -f 1)"
[[ "$username_hash" =~ ^[0-9a-f]{64}$ && "$password_hash" =~ ^[0-9a-f]{64}$ ]] || {
printf '%s\n' 'Failed to generate LubeLogger credential hashes' >&2
exit 1
}
auth_file="$path/.lubelogger-auth.env"
if [[ -L "$auth_file" ]]; then
printf '%s\n' 'LubeLogger authentication file must not be a symbolic link' >&2
exit 1
fi
if [[ -e "$auth_file" && ! -f "$auth_file" ]]; then
printf '%s\n' 'LubeLogger authentication path must be a regular file' >&2
exit 1
fi
umask 077
temp_file="$(mktemp "$path/.lubelogger-auth.env.tmp.XXXXXX")"
trap 'rm -f -- "${temp_file:-}"' EXIT
printf '%s\n' \
'EnableAuth=true' \
"UserNameHash=$username_hash" \
"UserPasswordHash=$password_hash" \
'DisableRegistration=true' \
'LUBELOGGER_OPEN_REGISTRATION=false' >"$temp_file"
chmod 0600 "$temp_file"
chown 1000:1000 "$temp_file"
mv -f -- "$temp_file" "$auth_file"
trap - EXIT
chown 1000:1000 "$path"
chmod 0750 "$path"
[[ "$(stat -c '%a' -- "$auth_file")" = 600 ]] || {
printf '%s\n' 'LubeLogger authentication file permissions must be 0600' >&2
exit 1
}
}
prepare_lubelogger
+2
View File
@@ -0,0 +1,2 @@
#!/bin/bash
docker-compose down --volumes
+4
View File
@@ -0,0 +1,4 @@
#!/usr/bin/env bash
set -euo pipefail
"$(dirname "$0")/init.sh"