mirror of
https://github.com/okxlin/appstore.git
synced 2026-11-22 00:00:30 +00:00
Update app version [skip ci]
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
services:
|
||||
downtify:
|
||||
image: "ghcr.io/henriquesebastiao/downtify:3.12.0@sha256:9a40e7a4674422b891e8b954fa4503f21358f265a058688557ddb00b5549743c"
|
||||
image: "ghcr.io/henriquesebastiao/downtify:3.10.0@sha256:8daf035bebbb51042cc26a11732778743b5f389302af4a5c9d435ea736d4fecd"
|
||||
container_name: ${CONTAINER_NAME}
|
||||
restart: unless-stopped
|
||||
user: "1000:1000"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
services:
|
||||
downtify:
|
||||
image: "ghcr.io/henriquesebastiao/downtify:3.12.0@sha256:9a40e7a4674422b891e8b954fa4503f21358f265a058688557ddb00b5549743c"
|
||||
image: "ghcr.io/henriquesebastiao/downtify:3.11.0@sha256:65db7768cbf8e67c2f73429420e799771dfdb60469be332f19440a7427e77933"
|
||||
container_name: ${CONTAINER_NAME}
|
||||
restart: unless-stopped
|
||||
user: "1000:1000"
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
CONTAINER_NAME=downtify-compose-check
|
||||
PANEL_APP_PORT_HTTP=8000
|
||||
APP_DATA_DIR=./data
|
||||
APP_DOWNLOADS_DIR=./downloads
|
||||
@@ -0,0 +1,83 @@
|
||||
additionalProperties:
|
||||
formFields:
|
||||
- default: 8000
|
||||
edit: true
|
||||
envKey: PANEL_APP_PORT_HTTP
|
||||
labelEn: Port
|
||||
labelZh: 端口
|
||||
label:
|
||||
en: Port
|
||||
zh: 端口
|
||||
zh-hant: 埠
|
||||
ja: ポート
|
||||
ko: 포트
|
||||
ru: Порт
|
||||
ms: Port
|
||||
pt-br: Porta
|
||||
tr: Bağlantı noktası
|
||||
es-es: Puerto
|
||||
fa: درگاه
|
||||
lo: ພອດ
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
- 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: Diretório de dados
|
||||
tr: Veri dizini
|
||||
es-es: Directorio de datos
|
||||
fa: پوشه دادهها
|
||||
lo: ໄດເຣັກທໍຣີຂໍ້ມູນ
|
||||
required: true
|
||||
type: text
|
||||
- default: ./downloads
|
||||
edit: true
|
||||
envKey: APP_DOWNLOADS_DIR
|
||||
labelEn: Downloads Directory
|
||||
labelZh: 下载目录
|
||||
label:
|
||||
en: Downloads Directory
|
||||
zh: 下载目录
|
||||
zh-hant: 下載目錄
|
||||
ja: ダウンロードディレクトリ
|
||||
ko: 다운로드 디렉터리
|
||||
ru: Каталог загрузок
|
||||
ms: Direktori muat turun
|
||||
pt-br: Diretório de downloads
|
||||
tr: İndirme dizini
|
||||
es-es: Directorio de descargas
|
||||
fa: پوشه دانلودها
|
||||
lo: ໄດເຣັກທໍຣີດາວໂຫຼດ
|
||||
required: true
|
||||
type: text
|
||||
- default: Asia/Shanghai
|
||||
edit: true
|
||||
envKey: TZ
|
||||
labelEn: Timezone
|
||||
labelZh: 时区
|
||||
label:
|
||||
en: Timezone
|
||||
zh: 时区
|
||||
zh-hant: 時區
|
||||
ja: タイムゾーン
|
||||
ko: 시간대
|
||||
ru: Часовой пояс
|
||||
ms: Zon waktu
|
||||
pt-br: Fuso horário
|
||||
tr: Saat dilimi
|
||||
es-es: Zona horaria
|
||||
fa: منطقه زمانی
|
||||
lo: ເຂດເວລາ
|
||||
required: true
|
||||
type: text
|
||||
@@ -0,0 +1,35 @@
|
||||
services:
|
||||
downtify:
|
||||
image: "ghcr.io/henriquesebastiao/downtify:3.12.0@sha256:9a40e7a4674422b891e8b954fa4503f21358f265a058688557ddb00b5549743c"
|
||||
container_name: ${CONTAINER_NAME}
|
||||
restart: unless-stopped
|
||||
user: "1000:1000"
|
||||
networks:
|
||||
- 1panel-network
|
||||
ports:
|
||||
- "${PANEL_APP_PORT_HTTP}:8000"
|
||||
environment:
|
||||
- DOWNTIFY_PORT=8000
|
||||
- HOME=/data
|
||||
read_only: true
|
||||
tmpfs:
|
||||
- /tmp:size=64m,mode=1777
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
cap_drop:
|
||||
- ALL
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-q", "-O", "/dev/null", "http://127.0.0.1:8000/"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
start_period: 20s
|
||||
retries: 3
|
||||
volumes:
|
||||
- "${APP_DATA_DIR}:/data"
|
||||
- "${APP_DOWNLOADS_DIR}:/downloads"
|
||||
labels:
|
||||
createdBy: "Apps"
|
||||
|
||||
networks:
|
||||
1panel-network:
|
||||
external: true
|
||||
Executable
+67
@@ -0,0 +1,67 @@
|
||||
#!/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}"
|
||||
}
|
||||
|
||||
prepare_app_path() {
|
||||
local key="$1"
|
||||
local default_value="$2"
|
||||
local raw path
|
||||
raw="$(configured_value "$key" "$default_value")"
|
||||
|
||||
[[ -n "$raw" ]] || {
|
||||
printf '%s must not be empty\n' "$key" >&2
|
||||
exit 1
|
||||
}
|
||||
if [[ "$raw" = /* ]]; then
|
||||
printf '%s must be relative to the application version directory\n' "$key" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
path="$(realpath -m -- "$ROOT_DIR/${raw#./}")"
|
||||
case "$path" in
|
||||
"$ROOT_DIR"/*) ;;
|
||||
*)
|
||||
printf '%s must remain inside the application version directory\n' "$key" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
install -d -m 0700 "$path"
|
||||
path="$(realpath -e -- "$path")"
|
||||
case "$path" in
|
||||
"$ROOT_DIR"/*) ;;
|
||||
*)
|
||||
printf '%s resolves outside the application version directory\n' "$key" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
chmod 0700 "$path"
|
||||
chown -R --no-dereference 1000:1000 "$path"
|
||||
}
|
||||
|
||||
prepare_app_path APP_DATA_DIR ./data
|
||||
prepare_app_path APP_DOWNLOADS_DIR ./downloads
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
"$(dirname "$0")/init.sh"
|
||||
Reference in New Issue
Block a user