Git Product home page Git Product logo

lsky-pro-docker's Issues

docker-compose部署如何迁移

开发者您好,我想问下,如果想更换服务器(反代后域名不变),该怎样迁移数据。
希望可以得到指正:

  • $PWD/mysql/data文件打包迁移到另一个服务器相同位置,再进行docker-compose部署,最后反代。

请问这样有可行性吗,或者是否有疏漏?
因数据较多原因,还未进行迁移,想得到更专业点的想法
非常感谢

怎么开启redis呢?

图床已经用docker的方式安装好了,是否再单独安装个redis(不限docker),然后去修改env,连接上就可以了

重新部署配置无法保留

如题,只映射/var/www/html/storage目录,在容器更改了配置(或者版本更新后)无法保存配置,需要重新配置数据库和管理员等,且配置完进去可能和之前的有冲突,会导致错误500,无法正常使用,不知道我是特例还是都是这样的。

目前尝试映射:/var/www/html/config/var/www/html/app/var/www/html/.env都没办法保存配置数据,只能映射整个/var/www/html目录到本地,这样删除容器重新部署不会丢失配置数据,但是不知道对后续升级有什么影响。

不知道可不可以优化下结构,把各种配置文件修改到某一个目录,这样方便docker升级重新部署等操作!(之前截的图忘保存了,提交issues时候才发现没有图尴尬)

请问内存占用过大怎么解决

随着时间增加,越来越吃内存,上次快吃了1g,并且限制内存似乎程序就会直接挂掉,求长期稳定占用比较低的内存方法

docker 部署后初始化失败

SQLSTATE[HY000] [2002] Connection refused (SQL: SHOW FULL TABLES WHERE table_type = 'BASE TABLE')

version: '3'
services:
  lskypro:
    image: halcyonazure/lsky-pro-docker:latest
    restart: unless-stopped
    hostname: lskypro
    container_name: lskypro
    volumes:
      - /root/lankong/WEB:/var/www/html/
    ports:
      - "9080:80"
    networks:
      - lsky-net

  mysql-lsky:
    image: mysql:5.7.22
    restart: unless-stopped
    # 主机名,可作为"数据库连接地址"
    hostname: mysql-lsky
    # 容器名称
    container_name: mysql-lsky
    # 修改加密规则
    command: --default-authentication-plugin=mysql_native_password
    volumes:
      - /root/lankong/mysql/data:/var/lib/mysql
      - /root/lankong/mysql/conf:/etc/mysql
      - /root/lankong/mysql/log:/var/log/mysql
    environment:
      MYSQL_ROOT_PASSWORD: aaaatest # 数据库root用户密码,自行修改
      MYSQL_DATABASE: lsky-data # 可作为"数据库名称/路径"
    networks:
      - lsky-net
    ports:
      - "3306:3306"

networks:
  lsky-net: {}

docker-compose 无法部署

你好,docker compose 启动访问http://localhost:9080/报错,日志如下:

Fatal error: Uncaught RuntimeException: A facade root has not been set. in /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:334 Stack trace: #0 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/RegisterErrorViewPaths.php(18): Illuminate\Support\Facades\Facade::__callStatic('replaceNamespac...', Array) #1 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(603): Illuminate\Foundation\Exceptions\RegisterErrorViewPaths->__invoke() #2 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(584): Illuminate\Foundation\Exceptions\Handler->registerErrorViewPaths() #3 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(515): Illuminate\Foundation\Exceptions\Handler->renderHttpException(Object(Symfony\Component\HttpKernel\Exception\HttpException)) #4 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(421): Illuminate\Foundation\Exceptions\Handler->prepareResponse(Object(Illuminate\Http\Request), Object(Symfony\Component\HttpKernel\Exception\HttpException)) #5 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(341): Illuminate\Foundation\Exceptions\Handler->renderExceptionResponse(Object(Illuminate\Http\Request), Object(Error)) #6 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(427): Illuminate\Foundation\Exceptions\Handler->render(Object(Illuminate\Http\Request), Object(Error)) #7 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(115): Illuminate\Foundation\Http\Kernel->renderException(Object(Illuminate\Http\Request), Object(Error)) #8 /var/www/html/public/index.php(52): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request)) #9 {main} thrown in /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php on line 334

docker compose 内容如下:

version: '3'
services:
  lskypro:
    image: halcyonazure/lsky-pro-docker:latest
    restart: unless-stopped
    hostname: lskypro
    container_name: lskypro
    volumes:
      - {path}storage:/var/www/html/storage
    ports:
      - "9080:80"
    networks:
      - lsky-net

  mysql-lsky:
    image: mysql:5.7.22
    restart: unless-stopped
    # 主机名,可作为子网域名填入安装引导当中
    hostname: mysql-lsky
    # 容器名称
    container_name: mysql-lsky
    # 修改加密规则
    command: --default-authentication-plugin=mysql_native_password
    volumes:
      - {path}mysql/data:/var/lib/mysql
      - {path}mysql/conf:/etc/mysql
      - {path}mysql/log:/var/log/mysql
    environment:
      MYSQL_ROOT_PASSWORD: lAsWjb6rzSzENUYg # 数据库root用户密码
      MYSQL_DATABASE: lsky-data # 给lsky-pro用的数据库名称
    networks:
      - lsky-net

networks:
  lsky-net:

图片管理中部分缩略图加载异常

图片管理中部分缩略图加载异常,不是固定的缩略图加载异常 是随机性的 但是点击进去又是显示正常 麻烦大佬看下是不是apache性能太低跟不上 盼切大佬修复~

image
image

使用nginx反代后访问域名无法正常使用

核心问题:访问反代后的域名会自动添加一个端口号。


我将lsky pronginx proxy manager部署在同一个docker网络中,lsky prodocker-compose.yml内容如下:

version: '3.9'
services:
  lsky-pro:
    image: halcyonazure/lsky-pro-docker:latest
    container_name: lsky-pro
    restart: unless-stopped
    ports:
      - 8089:8089
    expose:
      - 8089
    environment:
      - WEB_PORT=8089
    volumes:
      - ./data:/var/www/html
    networks:
      - default

  lsky-db:
    image: postgres:latest
    container_name: lsky-db
    restart: unless-stopped
    environment:
      POSTGRES_USER: lsky
      POSTGRES_PASSWORD: lsky
      POSTGRES_DB: lsky
    volumes:
      - ./db:/var/lib/postgresql/data
    networks:
      - default

networks:
  default:
    name: nginx-proxy
    external: true
    driver: bridge
    ipam:
      driver: default
      config:
        - subnet: 172.22.0.0/16

我在nginx proxy manager的高级参数中添加了如下内容:

proxy_set_header X-Forwarded-Proto $scheme;
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;

当我访问我的域名的时候(例如https://pic.mydomain.com),会自动跳转到https://pic.momoai.me:8089/install。但是假如我直接访问内网ip,例如http://192.168..5.40:8089,是能够正常进入安装步骤的。

请问为什么会自动跳转到端口号呢?

补充信息:

我最开始配置的时候,是先使用局域网ip配置完成后再反向代理的,之后访问域名会加载出部分画面,查看控制台发现很多请求发往https://pic.mydomain.com:8089,我怀疑是作者的apache设置原因,但是我并不熟悉其设置,作者能提供一个思路,或者分析出其他原因吗?

万分感谢!

按照使用Nginx反向代理配置HTTPS进行docker的部署,部署完成后内网访问网页页面加载异常

unraid系统,反代使用的[Nginx Proxy Manager],目前仅将图床的docker正常部署下来

1.具体docker参数如图
image

2.在终端执行了相关以下指令
docker exec -it lskypro sed -i '32 a \\Illuminate\Support\Facades\URL::forceScheme('"'"'https'"'"');' /var/www/html/app/Providers/AppServiceProvider.php

配置完成后内网访问页面无法正常加载,具体显示如下:
image

容器化部署升级软件版本时要保留和删除哪些目录

您好,现在遇到一个问题,从2.0版本部署的兰空图床,现在想要升级到2.1要如何操作,直接docker-compose 更换镜像版本,无法覆盖容器工作目录(数据卷)下的代码,如果删除某些目录再升级又会造成图片丢失,因为这个容器数据卷映射的是整个工作目录,所以想请教下升级软件版本要如何操作

群辉部署时启动失败

报错信息:
(38)Function not implemented: AH00141: Could not initialize random number generator
Action '-D FOREGROUND' failed.
这是什么问题呢

wsl没有公网ip

如果用部署在wsl上,图片的url好像就不能配自己的域名了

重启计算机后,运行docker container,进入install配置,lsky相关历史数据全部消失

现状:我用的windows 10,用docker,在本机上 成功部署了lsky pro v2.x,在install配置界面,采用sqlite数据库,能够正常进入localhost:8081进行设置、图片上传,连picgo与lsky的互联都搞好,并且可以正常使用。在docker desktop界面,可以自由的开启、关闭lsky container,lsky功能没有影响,上传图片保存完好。

症状:但是,重启计算机之后,重新运行docker container(lsky pro),进入localhost:8081,界面显示:进行install配置。进行install配置后,没有数据,啥都没了。

问题:重启计算机后,会导致docker container内部的lsky pro重置状态吗?该怎么解决这个问题呢?谢谢。

dockerhub中的端口好像写错了

github项目中写的容器内部管理端口是8089
可是在dockerhub里写的管理端口是80
我前几天部署的时候用-p 9080:80时是不管用的,我追到github里才发现是-p 8089:8089 应该是dockerhub里写错了

小白所不会解决的问题,求解大神

本人纯小白,想请教大神发生这种情况,应该如何操作修改?
跪求大神解答谢谢!
日志里的报错:
2022/3/31 13:42:05 AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using fd00:db7::242:ac11:d. Set the 'ServerName' directive globally to suppress this message
使用时候的问题:
image.png

Docker运行500报错,但是图库里的图片访问正常

1个月之前通过docker安装了mysql,然后安装lsky pro,初始设置也都正常,页面可以正常打开。后来硬盘被我拿出来再放回去docker应用都没了,再次安装mysql和lsky pro,mysql正常后者不能打开页面显示500错误,但是之前上传的图片可以正常访问,就是控制台首页打不开。

docker日志:
QG06 _MRKKMK@N1_3D1}AYN

主页:
BKMV`ZYMMNY{~T7(TFE 1VD

图片正常显示:
image

正常使用过程中,突然无法访问图床

问题现象:无法打开图床页面
镜像ID:6704a72cc556f282e80c4abbf53db92053e03e453368ab4f5be55aa0330a2d37
数据库版本:mysql5.7.22

以下是访问时的日志:
2024/04/29 18:55:49 stdout 172.29.0.1 - - [29/Apr/2024:10:55:48 +0000] "GET / HTTP/1.1" 500 211 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"
2024/04/29 18:54:13 stdout 172.29.0.1 - - [29/Apr/2024:10:54:13 +0000] "-" 408 0 "-" "-"
2024/04/29 18:53:23 stdout 172.29.0.1 - - [29/Apr/2024:10:53:21 +0000] "GET / HTTP/1.1" 500 211 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"
2024/04/29 18:50:45 stdout 172.29.0.1 - - [29/Apr/2024:10:50:45 +0000] "-" 408 0 "-" "-"
2024/04/29 18:49:53 stdout 172.29.0.1 - - [29/Apr/2024:10:49:53 +0000] "GET /upload HTTP/1.1" 500 211 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"
2024/04/29 18:49:47 stdout 172.29.0.1 - - [29/Apr/2024:10:49:46 +0000] "GET / HTTP/1.1" 500 211 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"

2.1版本的镜像启动报错

image

> docker logs -t -f --tail 100 lskypro3 2023-02-23T20:04:00.660799368Z cp: cannot stat '/var/www/lsky/.env.example': No such file or directory 2023-02-23T20:04:01.181077416Z cp: cannot stat '/var/www/lsky/.env.example': No such file or directory 2023-02-23T20:04:01.603063293Z cp: cannot stat '/var/www/lsky/.env.example': No such file or directory 2023-02-23T20:04:02.233028969Z cp: cannot stat '/var/www/lsky/.env.example': No such file or directory 2023-02-23T20:04:03.321051077Z cp: cannot stat '/var/www/lsky/.env.example': No such file or directory 2023-02-23T20:04:05.232923745Z cp: cannot stat '/var/www/lsky/.env.example': No such file or directory 2023-02-23T20:04:08.671716192Z cp: cannot stat '/var/www/lsky/.env.example': No such file or directory 2023-02-23T20:04:15.325062644Z cp: cannot stat '/var/www/lsky/.env.example': No such file or directory

您好,首先很感谢您的镜像分享, 在最新的v2.1版本的镜像中有如上报错,麻烦给看下呢

关于启动镜像会报 Could not reliably determine the server's fully qualified domain name,以及端口更换问题

环境

  • docker镜像为最新构建的镜像
  • 使用系统为:Debian 11

问题

使用 docker compose up 启动镜像后会报错,然后无法启动,具体报错信息如下

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.21.0.2. Set the 'ServerName' directive globally to suppress this message
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.21.0.2. Set the 'ServerName' directive globally to suppress this message
[Sun May 07 01:37:34.435506 2023] [mpm_prefork:notice] [pid 16] AH00163: Apache/2.4.56 (Debian) PHP/8.1.18 configured -- resuming normal operations
[Sun May 07 01:37:34.442329 2023] [core:notice] [pid 16] AH00094: Command line: '/usr/sbin/apache2 -D FOREGROUND'

截图

配置

docker-compose.yml 文件如下

services:
  lsky:
    image: halcyonazure/lsky-pro-docker:latest
    restart: unless-stopped
    volumes:
      - /data/lsky/web:/var/www/html/
    networks:
      - nginx-proxy

networks:
  nginx-proxy:
    name: nginx-proxy-manager_nginx-proxy
    external: true

PS:非常感谢作者大大的项目,希望这个问题可以得到解决

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.