安装兰空图床

安装方式

bt面板

https://github.com/lsky-org/lsky-pro

先下载到服务器文件里面
image
添加站点
php要求8.0安装扩展fileinfo
站点目录设置/public
伪静态填写

location / {
  try_files $uri $uri/ /index.php?$query_string;
}

域名解析后登录站点进行安装

Docker-compose安装

version: '3.3'
services:
  lsky-pro-docker:
    container_name: lsky-pro
    restart: always
    ports:
      - '127.0.0.1:9080:80'
    volumes:
      - './data:/var/www/html'
    image: 'halcyonazure/lsky-pro-docker:latest'

Docker一键部署

docker run -d \
    --name lsky-pro \
    --restart unless-stopped \
    -p 9080:80 \
    -v /usr/local/lsky-pro:/var/www/html \
    halcyonazure/lsky-pro-docker:latest

反向代理

            location /{
    proxy_pass http://127.0.0.1:9080;
    proxy_set_header Host $host:$server_port;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header REMOTE-HOST $remote_addr;
    proxy_set_header X-Forwarded-Proto https;
    add_header X-Cache $upstream_cache_status;
}

官方镜像仓库
https://hub.docker.com/r/dko0/lsky-pro
官方文档
https://docs.lsky.pro/
文章内容引用
https://www.hash070.top/archives/lsky-pro-docker-deploy.html

更新

cp -r /root/data/docker_data/lsky-pro/lsky-pro-data /root/data/docker_data/lsky-pro/lsky-pro-data.archive  # 万事先备份,以防万一

cp -r /root/data/docker_data/lsky-pro/db /root/data/docker_data/lsky-pro/db.archive #数据库也备份一下

cd /root/data/docker_data/lsky-pro  # 进入docker-compose所在的文件夹

docker-compose pull    # 拉取最新的镜像

docker-compose up -d   # 重新更新当前镜像

卸载

cd /root/data/docker_data/lsky-pro  # 进入docker-compose所在的文件夹

docker-compose down    # 停止容器,此时不会删除映射到本地的数据

rm -rf /root/data/docker_data//root/data/docker_data/lsky-pro  # 完全删除映射到本地的数据