PVE 乱入之LXC ‐ sub store - cooip-jm/About-openwrt GitHub Wiki
PVE乱入之 sub store
克隆个debian ,纯lxc也可以使用这种方式
体积比较大 咋们给它分大一点磁盘空间,纯lxc可忽略此步
为了方便实用,咋们可以给它固定个IP
启动 安装docker 官方一键部署
curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
三条命令完成部署
curl -sSL https://sub-store-org.github.io/resource/ssm/install.sh | bash
ssm new
ssm new -i
安装部分结束
更新
前端
ssm update -n ssm-frontend
后端
ssm update
官方文档 可以自己研究
https://xream.notion.site/Sub-Store-abe6a96944724dc6a36833d5c9ab7c87
https://github.com/sub-store-org/Sub-Store-Manager-Cli
Sing-Box Substore 模版
https://github.com/doyoman/doyo/tree/main/sing-box
sing-box动态订阅配置完成
使用作者自有docker镜像
启用80前端和3000后端,lxc /root作为映射目录
A方案
docker run -d --name sub-store --network host --restart always -v /root:/opt/app/data -e SUB_STORE_BACKEND_CRON="0 0 * * *" -e SUB_STORE_FRONTEND_BACKEND_PATH="/" -e SUB_STORE_FRONTEND_HOST="0.0.0.0" -e SUB_STORE_FRONTEND_PORT="80" -e SUB_STORE_DATA_BASE_PATH="/opt/app/data" -e SUB_STORE_BACKEND_API_HOST="0.0.0.0" -e SUB_STORE_BACKEND_API_PORT="3000" -i -t xream/sub-store:latest
B方案
version: "3.8"
services:
sub-store:
image: xream/sub-store:latest
container_name: sub-store
network_mode: host
restart: always
volumes:
- /root:/opt/app/data
environment:
- SUB_STORE_BACKEND_CRON=0 0 * * *
- SUB_STORE_FRONTEND_BACKEND_PATH=/
- SUB_STORE_FRONTEND_HOST=0.0.0.0
- SUB_STORE_FRONTEND_PORT=80
- SUB_STORE_DATA_BASE_PATH=/opt/app/data
- SUB_STORE_BACKEND_API_HOST=0.0.0.0
- SUB_STORE_BACKEND_API_PORT=3000
stdin_open: true
tty: true
又或者
Sub-Sore compose.yaml 前端80,后端3000
services:
sub-store:
stdin_open: true
tty: true
restart: always
environment:
- HOST=0.0.0.0
- PORT=9876
- SUB_STORE_BACKEND_API_PORT=3000
- SUB_STORE_FRONTEND_PORT=80
- SUB_STORE_BACKEND_API_HOST=0.0.0.0
- SUB_STORE_FRONTEND_HOST=0.0.0.0
volumes:
- /root/sub-store-data:/opt/app/data
container_name: sub-store
image: xream/sub-store
network_mode: host
与之配合的watchtower compose.yaml
services:
watchtower:
container_name: watchtower
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock
image: containrrr/watchtower
command: --cleanup -i 7800 --warn-on-head-failure never -c sub-store