安装开源auxpi图床

🍭 集合多家 API 的新一代图床

构建

从源码构建docker镜像

git clone https://github.com/aimerforreimu/auxpi.git --depth 1
cd auxpi
make docker

部署

采用caddy + auxpi方式

cdn.ysicing.me {
    gzip
    prometheus
    cache
    log / /var/log/caddy/cdn.tc.log "{remote} {when} {method} {uri} {proto} {status} {size} {>User-Agent} {latency}" {
        rotate_size 50
        rotate_age  90
        rotate_keep 20
        rotate_compress
    }
    errors {
        * /tmp/404.html
    }
    tls root@ysicing.net
    header / {
        Strict-Transport-Security "max-age=31536000;includeSubDomains;preload"
        -Server
    }
    proxy / http://127.0.0.1:2333 {
        websocket
        transparent
    }
}

auxpi部署

version: '2.1'
services:
  caddy:
    image: spanda/caddy:hugo
    container_name: caddy
    volumes:
    - ./ssl:/root/.caddy
    - /var/log/caddy:/var/log/caddy
    - ./Caddyfile:/etc/Caddyfile
    network_mode: host
    restart: always
  cdn:
    image: ysicing/auxpi
    container_name: cdn
    environment:
    - USERNAME=<马赛克>
    - EMAIL=<马赛克>
    - PASSWORD=<马赛克>
    volumes:
    - /kun/cdn/conf:/opt/go/conf
    - /kun/cdn/db:/opt/go/db
    - /kun/cdn/tc:/opt/go/public
    network_mode: host
    restart: always

然后就启动服务docker-compose up -d

访问配置

使用本地图床, 注意事项

  • 软路径为 /images/
  • 站点路径为https://cdn.ysicing.me/

Last modification:September 24th, 2019 at 10:35 pm
搞技术/肝文章不易,恳请随意打赏 OwO

Leave a Comment