Skip to content

漫画管理MangoDocker+宝塔+GoogleDrive无限云盘

https://github.com/hkalexling/Mango

宝塔+CloudFlare新建网站+SSL+强制https

在Google Drive上创建文件目录

# remote data & config folder
cd /data/gd_stanford/_host/bwh229
mkdir -p ./mango_comic/data ./mango_comic/config

# local operation folder
cd /data
git clone https://github.com/hkalexling/Mango ./mango_comic
cd mango_comic
cp env.example .env && vi .env

安装并启动docker-composer

修改.env文件,修改对外的访问端口(我选了9009) 并填上对应的数据目录和配置文件的存放目录

# Port that exposes the HTTP frontend
PORT=9009

# Path to the mango main directory
# This directory holds the database and the library files
MAIN_DIRECTORY_PATH=/data/gd_stanford/_host/bwh229/mango_comic/data

# Path to the mango config directory
# This directory holds the mango configuration path
CONFIG_DIRECTORY_PATH=/data/gd_stanford/_host/bwh229/mango_comic/config
# 查看一下
cat docker-compose.yml
version: '3'

services:
  mango:
    container_name: mango
    restart: always
    build:
      context: .
      dockerfile: ./Dockerfile
    expose:
      - ${PORT}
    ports:
      - "${PORT}:9000"
    volumes:
      - ${MAIN_DIRECTORY_PATH}:/root/mango
      - ${CONFIG_DIRECTORY_PATH}:/root/.config/mango
docker-compose up -d
# local port 9009 -> docker port 9000

获取初始的用户名密码

docker logs mango

设置好文件访问

# 这样可以直接上传.zip漫画文件到 xx.ck.mk/data即可

cd /www/wwwroot/xx.ck.mk
ln -s /data/gd_stanford/_host/bwh229/mango_comic/data ./data
chown -R www:www ./data
chattr -i .user.ini
echo ':/data/gd_stanford/_host/bwh229/mango_comic/data/' >> .user.ini
chattr +i .user.ini

library下面的漫画文件必须放在相应分开独立的漫画folder下面,而不能把所有zip直接平铺在library下面。比如

宝塔设置好反代

打开CloudFlare Proxy

验证

Leave a Reply

Your email address will not be published.