一个用于将 Docker 容器和 Lucky 代理服务导入到 Sun-Panel 的工具,同时支持从浏览器书签文件导入网站链接。
.
├── app.py # 主应用程序文件
├── Dockerfile # Docker 构建文件
├── docker-compose.yml # Docker Compose 配置文件
├── requirements.txt # Python 依赖文件
├── .env # 环境变量配置文件
├── templates/
│ └── index.html # 前端界面文件
├── static/
│ └── favicon.ico # 网站图标
└── bookmarks_history/ # 书签文件存储目录
services:
sun-panel-icon-adder:
image: ghcr.io/sqing33/sun-panel-icon-adder
container_name: sun-panel-icon-adder
restart: always
ports:
- "3003:3003"
environment:
- SUNPANEL_API_BASE=http://192.168.1.100:3002/openapi/v1
- SUNPANEL_API_TOKEN=
- LUCKY_API_ENDPOINT=http://192.168.1.100:16601
- LUCKY_API_TOKEN=
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./bookmarks_history:/app/bookmarks_history
在 .env 文件中配置以下环境变量:
# SunPanel API 配置
SUNPANEL_API_BASE=http://your-sunpanel-ip:3002/openapi/v1
SUNPANEL_API_TOKEN=your_sunpanel_token
# Lucky API 配置
LUCKY_API_ENDPOINT=http://your-lucky-ip:16601
LUCKY_API_TOKEN=your_lucky_token
docker-compose.yml 中的环境变量配置docker-compose up -d
pip install -r requirements.txt
python app.py
http://localhost:3003 打开应用界面/api/get_icon_urls?url= - 获取网站图标 URL/api/sunpanel/groups - 获取 Sun-Panel 分组列表/api/sunpanel/item/create - 创建 Sun-Panel 项目/api/bookmarks/upload - 上传书签文件/api/bookmarks/history - 获取书签文件历史记录/api/bookmarks/load/<filename> - 加载历史书签文件Content type
Image
Digest
sha256:289a8b23e…
Size
27.1 MB
Last updated
about 1 year ago
docker pull sqing33/sun-panel-icon-adder