1G内存低配服务器部署兰空图床Lksy-Pro

兰空图床,如果使用源码方式部署,需要安装php,php要安装多个拓展例如fileinfo、imagemagick,1g及以下内存的低配vps基本上很难安装成功。

因此推荐使用docker部署,不用折腾php。以一台刚采购的debian 1核1g 服务器为例:

 

apt update
curl -fsSL https://get.docker.com | sh

mkdir /opt/lsky
cd /opt/lsky
cat > docker-compose.yml << 'EOF'
services:
  lsky-pro:
    image: halcyonazure/lsky-pro-docker:latest
    container_name: lsky-pro
    restart: unless-stopped
    ports:
      - "8089:8089"
    volumes:
      - /opt/lksy/data:/var/www/html
    environment:
      - WEB_PORT=8089
    # 仅当 MySQL 装在宿主机上时需要这一段
    extra_hosts:
      - "host.docker.internal:host-gateway"
EOF
docker compose up -d

 

使用nginx代理

    location / {
        proxy_pass http://127.0.0.1:8089;

        proxy_set_header Host              $host;
        proxy_set_header X-Real-IP         $remote_addr;
        proxy_set_header X-Forwarded-For   $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-Host  $host;
        proxy_set_header X-Forwarded-Port  $server_port;
    }

 

然后访问服务器地址 http://server_ip,自动打开初次部署页面,低配置服务器推荐选择sqlite,然后就ok了

posted @ 2026-10-09 09:45  sherlock-merlin  阅读(24)  评论(0)    收藏  举报