From e2cfce9dcdb007110b9869c19e7f2cbe065990e8 Mon Sep 17 00:00:00 2001 From: Meng Sen Date: Wed, 23 Jul 2025 15:18:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E5=B8=83=E5=BA=94=E7=94=A8=20ArchiveB?= =?UTF-8?q?ox?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Meng Sen --- apps/archivebox/0.7.3/docker-compose.yml | 16 ----- apps/archivebox/0.8.5rc51/data.yml | 67 +++++++++++++++++++ apps/archivebox/0.8.5rc51/docker-compose.yml | 41 ++++++++++++ apps/archivebox/0.8.5rc51/envs/default.env | 2 + apps/archivebox/0.8.5rc51/envs/global.env | 2 + apps/archivebox/0.8.5rc51/scripts/init.sh | 17 +++++ .../archivebox/0.8.5rc51/scripts/uninstall.sh | 10 +++ apps/archivebox/0.8.5rc51/scripts/upgrade.sh | 17 +++++ 8 files changed, 156 insertions(+), 16 deletions(-) create mode 100644 apps/archivebox/0.8.5rc51/data.yml create mode 100644 apps/archivebox/0.8.5rc51/docker-compose.yml create mode 100644 apps/archivebox/0.8.5rc51/envs/default.env create mode 100644 apps/archivebox/0.8.5rc51/envs/global.env create mode 100644 apps/archivebox/0.8.5rc51/scripts/init.sh create mode 100644 apps/archivebox/0.8.5rc51/scripts/uninstall.sh create mode 100644 apps/archivebox/0.8.5rc51/scripts/upgrade.sh diff --git a/apps/archivebox/0.7.3/docker-compose.yml b/apps/archivebox/0.7.3/docker-compose.yml index 60d51a9a0..9bbbdfbed 100644 --- a/apps/archivebox/0.7.3/docker-compose.yml +++ b/apps/archivebox/0.7.3/docker-compose.yml @@ -26,22 +26,6 @@ services: - SEARCH_BACKEND_HOST_NAME=archivebox-sonic - SEARCH_BACKEND_PASSWORD=${ADMIN_PASSWORD:-} - archivebox-scheduler: - image: archivebox/archivebox:0.7.3 - container_name: scheduler-${CONTAINER_NAME} - command: schedule --foreground --update --every=day - env_file: - - ${GLOBAL_ENV_FILE:-/etc/1panel/envs/global.env} - - ${ENV_FILE:-/etc/1panel/envs/default.env} - volumes: - - ${ARCHIVEBOX_ROOT_PATH}/data:/data - environment: - - TZ=Asia/Shanghai - - TIMEOUT=120 - - SEARCH_BACKEND_ENGINE=sonic - - SEARCH_BACKEND_HOST_NAME=archivebox-sonic - - SEARCH_BACKEND_PASSWORD=${ADMIN_PASSWORD:-} - archivebox-sonic: image: archivebox/sonic:latest container_name: sonic-${CONTAINER_NAME} diff --git a/apps/archivebox/0.8.5rc51/data.yml b/apps/archivebox/0.8.5rc51/data.yml new file mode 100644 index 000000000..8cb57dd82 --- /dev/null +++ b/apps/archivebox/0.8.5rc51/data.yml @@ -0,0 +1,67 @@ +additionalProperties: + formFields: + - default: "/home/archivebox" + edit: true + envKey: ARCHIVEBOX_ROOT_PATH + labelZh: 数据持久化路径 + labelEn: Data persistence path + required: true + type: text + - default: 8000 + edit: true + envKey: PANEL_APP_PORT_HTTP + labelZh: WebUI 端口 + labelEn: WebUI port + required: true + rule: paramPort + type: number + - default: "archivebox" + edit: true + envKey: ADMIN_USERNAME + labelZh: 管理员用户名 + labelEn: Admin Username + required: true + type: text + - default: "archivebox" + edit: true + envKey: ADMIN_PASSWORD + labelZh: 管理员密码 + labelEn: Admin Password + required: true + type: password + - default: "True" + edit: true + envKey: PUBLIC_INDEX + labelZh: 是否公开快照列表 + labelEn: Whether to make the snapshot list public + required: true + type: select + values: + - label: 公开 + value: "True" + - label: 私密 + value: "False" + - default: "True" + edit: true + envKey: PUBLIC_SNAPSHOTS + labelZh: 是否公开快照内容 + labelEn: Whether to make snapshot content public + required: true + type: select + values: + - label: 公开 + value: "True" + - label: 私密 + value: "False" + - default: "False" + edit: true + envKey: PUBLIC_ADD_VIEW + labelZh: 是否允许匿名用户提交存档 + labelEn: Whether to allow anonymous users to submit archives + required: true + type: select + values: + - label: 允许 + value: "True" + - label: 禁止 + value: "False" diff --git a/apps/archivebox/0.8.5rc51/docker-compose.yml b/apps/archivebox/0.8.5rc51/docker-compose.yml new file mode 100644 index 000000000..870d325a1 --- /dev/null +++ b/apps/archivebox/0.8.5rc51/docker-compose.yml @@ -0,0 +1,41 @@ +networks: + 1panel-network: + external: true + +services: + archivebox: + image: archivebox/archivebox:0.8.5rc51 + container_name: ${CONTAINER_NAME} + labels: + createdBy: "Apps" + restart: always + networks: + - 1panel-network + ports: + - ${PANEL_APP_PORT_HTTP}:8000 + env_file: + - ${GLOBAL_ENV_FILE:-/etc/1panel/envs/global.env} + - ${ENV_FILE:-/etc/1panel/envs/default.env} + volumes: + - ${ARCHIVEBOX_ROOT_PATH}/data:/data + environment: + - TZ=Asia/Shanghai + - ALLOWED_HOSTS=* + - CSRF_TRUSTED_ORIGINS=http://localhost:8000 + - SEARCH_BACKEND_ENGINE=sonic + - SEARCH_BACKEND_HOST_NAME=archivebox-sonic + - SEARCH_BACKEND_PASSWORD=${ADMIN_PASSWORD:-} + + archivebox-sonic: + image: archivebox/sonic:latest + container_name: sonic-${CONTAINER_NAME} + expose: + - 1491 + env_file: + - ${GLOBAL_ENV_FILE:-/etc/1panel/envs/global.env} + - ${ENV_FILE:-/etc/1panel/envs/default.env} + volumes: + - ${ARCHIVEBOX_ROOT_PATH}/sonic:/var/lib/sonic/store + environment: + - TZ=Asia/Shanghai + - SEARCH_BACKEND_PASSWORD=${ADMIN_PASSWORD:-} diff --git a/apps/archivebox/0.8.5rc51/envs/default.env b/apps/archivebox/0.8.5rc51/envs/default.env new file mode 100644 index 000000000..cd05f46e6 --- /dev/null +++ b/apps/archivebox/0.8.5rc51/envs/default.env @@ -0,0 +1,2 @@ +# copyright© 2024 XinJiang Ms Studio +ENV_FILE=.env diff --git a/apps/archivebox/0.8.5rc51/envs/global.env b/apps/archivebox/0.8.5rc51/envs/global.env new file mode 100644 index 000000000..e10989fe4 --- /dev/null +++ b/apps/archivebox/0.8.5rc51/envs/global.env @@ -0,0 +1,2 @@ +# copyright© 2024 XinJiang Ms Studio +TZ=Asia/Shanghai diff --git a/apps/archivebox/0.8.5rc51/scripts/init.sh b/apps/archivebox/0.8.5rc51/scripts/init.sh new file mode 100644 index 000000000..07fb8c3fe --- /dev/null +++ b/apps/archivebox/0.8.5rc51/scripts/init.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +if [ -f .env ]; then + source .env + + # setup-1 add default values + CURRENT_DIR=$(pwd) + sed -i '/^ENV_FILE=/d' .env + sed -i '/^GLOBAL_ENV_FILE=/d' .env + echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env + echo "GLOBAL_ENV_FILE=${CURRENT_DIR}/envs/global.env" >> .env + + echo "Check Finish." + +else + echo "Error: .env file not found." +fi diff --git a/apps/archivebox/0.8.5rc51/scripts/uninstall.sh b/apps/archivebox/0.8.5rc51/scripts/uninstall.sh new file mode 100644 index 000000000..c86c4fbca --- /dev/null +++ b/apps/archivebox/0.8.5rc51/scripts/uninstall.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +if [ -f .env ]; then + source .env + + echo "Check Finish." + +else + echo "Error: .env file not found." +fi diff --git a/apps/archivebox/0.8.5rc51/scripts/upgrade.sh b/apps/archivebox/0.8.5rc51/scripts/upgrade.sh new file mode 100644 index 000000000..07fb8c3fe --- /dev/null +++ b/apps/archivebox/0.8.5rc51/scripts/upgrade.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +if [ -f .env ]; then + source .env + + # setup-1 add default values + CURRENT_DIR=$(pwd) + sed -i '/^ENV_FILE=/d' .env + sed -i '/^GLOBAL_ENV_FILE=/d' .env + echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env + echo "GLOBAL_ENV_FILE=${CURRENT_DIR}/envs/global.env" >> .env + + echo "Check Finish." + +else + echo "Error: .env file not found." +fi