发布应用 ArchiveBox

Signed-off-by: Meng Sen <qyg2297248353@gmail.com>
This commit is contained in:
Meng Sen
2025-07-23 15:18:10 +08:00
parent b8f261c099
commit e2cfce9dcd
8 changed files with 156 additions and 16 deletions

View File

@@ -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}

View File

@@ -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"

View File

@@ -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:-}

View File

@@ -0,0 +1,2 @@
# copyright© 2024 XinJiang Ms Studio
ENV_FILE=.env

View File

@@ -0,0 +1,2 @@
# copyright© 2024 XinJiang Ms Studio
TZ=Asia/Shanghai

View File

@@ -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

View File

@@ -0,0 +1,10 @@
#!/bin/bash
if [ -f .env ]; then
source .env
echo "Check Finish."
else
echo "Error: .env file not found."
fi

View File

@@ -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