GreaterWMS / GreaterWMS

This Inventory management system is the currently Ford Asia Pacific after-sales logistics warehousing supply chain process . After I leave Ford , I start this project . You can share your vacant warehouse space, use it for those in need, and generate income
https://www.56yhz.com/
Apache License 2.0
3.68k stars 942 forks source link

[question]docker部署出现问题 #329

Closed smilecat2788 closed 8 months ago

smilecat2788 commented 9 months ago

root@ubuntu:/home/GreaterWMS# docker-compose up -d [+] Running 2/3 ? Network greaterwms_basic Created 0.2s ? Container greaterwms_backend Started 1.0s ? Container greaterwms_front Starting 2.1s Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "/GreaterWMS/templates/web_start.sh": permission denied: unknown

环境为ubuntu server 22.04 后端可以正常启动,但是前端启动失败

Singosgu commented 9 months ago

提权

smilecat2788 commented 8 months ago

现在docker正常启动了但是 image 无法登录 image baseurl也修改成http://127.0.0.1:8282

smilecat2788 commented 8 months ago

后端日志 Welcome To GreaterWMS No changes detected Welcome To GreaterWMS Operations to perform: Apply all migrations: admin, asn, auth, binproperty, binset, binsize, capital, company, contenttypes, customer, cyclecount, dn, driver, goods, goodsbrand, goodsclass, goodscolor, goodsorigin, goodsshape, goodsspecs, goodsunit, payment, scanner, sessions, staff, stock, supplier, throttle, userprofile, warehouse Running migrations: No migrations to apply. 2023-08-09 02:59:53,352 CRIT Supervisor is running as root. Privileges were not dropped because no user is specified in the config file. If you intend to run as root, you can set user=root in the config file to avoid this message. 2023-08-09 02:59:53,353 WARN No file matches via include "/etc/supervisor/conf.d/.conf" 2023-08-09 02:59:53,353 WARN For [program:greaterwms], redirect_stderr=true but stderr_logfile has also been set to a filename, the filename has been ignored Unlinking stale socket /var/run/supervisor.sock 2023-08-09 02:59:53,670 INFO RPC interface 'supervisor' initialized 2023-08-09 02:59:53,671 CRIT Server 'unix_http_server' running without any HTTP authentication checking 2023-08-09 02:59:53,672 INFO supervisord started with pid 18 2023-08-09 02:59:54,676 INFO spawned: 'greaterwms' with pid 20 2023-08-09 02:59:55,678 INFO success: greaterwms entered RUNNING state, process has stayed up for > than 0 seconds (startsecs) Welcome To GreaterWMS No changes detected Welcome To GreaterWMS Operations to perform: Apply all migrations: admin, asn, auth, binproperty, binset, binsize, capital, company, contenttypes, customer, cyclecount, dn, driver, goods, goodsbrand, goodsclass, goodscolor, goodsorigin, goodsshape, goodsspecs, goodsunit, payment, scanner, sessions, staff, stock, supplier, throttle, userprofile, warehouse Running migrations: No migrations to apply. 2023-08-09 03:34:19,736 CRIT Supervisor is running as root. Privileges were not dropped because no user is specified in the config file. If you intend to run as root, you can set user=root in the config file to avoid this message. 2023-08-09 03:34:19,737 WARN No file matches via include "/etc/supervisor/conf.d/.conf" 2023-08-09 03:34:19,737 WARN For [program:greaterwms], redirect_stderr=true but stderr_logfile has also been set to a filename, the filename has been ignored Unlinking stale socket /var/run/supervisor.sock 2023-08-09 03:34:20,054 INFO RPC interface 'supervisor' initialized 2023-08-09 03:34:20,055 CRIT Server 'unix_http_server' running without any HTTP authentication checking 2023-08-09 03:34:20,056 INFO supervisord started with pid 17 2023-08-09 03:34:21,059 INFO spawned: 'greaterwms' with pid 19 2023-08-09 03:34:22,063 INFO success: greaterwms entered RUNNING state, process has stayed up for > than 0 seconds (startsecs) 前端日志 Build succeeded

Build mode........ spa Pkg quasar........ v1.19.4 Pkg @quasar/app... v2.4.1 Debugging......... no Publishing........ no Transpiled JS..... yes (Babel)

Output folder..... /GreaterWMS/templates/dist/spa

Tip: Built files are meant to be served over an HTTP server Opening index.html over file:// won't work

Tip: You can use "$ quasar serve" command to create a web server, both for testing or production. Type "$ quasar serve -h" for parameters. Also, an npm script (usually named "start") can be added for deployment environments. If you're using Vue Router "history" mode, don't forget to specify the "--history" parameter: "$ quasar serve --history"

Dev mode.......... spa Pkg quasar........ v1.19.4 Pkg @quasar/app... v2.4.1 Debugging......... enabled

Browserslist: caniuse-lite is outdated. Please run: npx update-browserslist-db@latest Why you should do it regularly: https://github.com/browserslist/update-db#readme Configured browser support (at least 88.57% of global marketshare): · Chrome for Android >= 103 · Firefox for Android >= 101 · Android >= 103 · Chrome >= 94 · Edge >= 100 · Firefox >= 94 · iOS >= 13.0-13.1 · Opera >= 85 · Safari >= 14.1

App · Reading quasar.conf.js App · Checking listening address availability (0.0.0.0:8080)... App · Transpiling JS (Babel active) App · Extending SPA Webpack config App · Generating Webpack entry point App · Booting up... App · Compiling SPA... App · Compiled SPA done in 86064 ms DONE Compiled successfully in 86082ms3:37:25 AM

N App dir........... /GreaterWMS/templates App URL........... http://localhost:8080 Dev mode.......... spa Pkg quasar........ v1.19.4 Pkg @quasar/app... v2.4.1 Transpiled JS..... yes (Babel)

ℹ 「wds」: Project is running at http://0.0.0.0:8080/ ℹ 「wds」: webpack output is served from

Singosgu commented 8 months ago

好像你没有build成功

smilecat2788 commented 8 months ago

那我应该如何做呢,我按照docker部署教程部署了两遍还是这样

Singosgu commented 8 months ago

chmod +x web_start.sh

smilecat2788 commented 8 months ago

image 这样应该是bulid成功了吧,但是还是会报网络异常,是不是前后端没连接起来 image

Singosgu commented 8 months ago

baseurl自己调整一下

smilecat2788 commented 8 months ago

当我使用反向代理时网页报错如下 image 不使用反向代理时网页报错如下 image 看报错好像已经定向到后端192.168.1.50:8282了,我尝试了直接在服务器运行后端和容器里运行后端,都没法连接到 顺便一提好像帮助文档的网站没了 image

Singosgu commented 8 months ago

在更换服务器,明天可以访问,你这个好像是nginx的问题,配置的nginx发一下

smilecat2788 commented 7 months ago

我今天回家试了一下,直接走局域网访问可以打开,当我使用公网http访问时会出现网络错误,没有经过nginx,这是我完整的做法,希望能帮助你定位问题

  1. 从GitHub克隆仓库到本地
  2. 提权web_start.sh和backend_start.sh
  3. 修改compose文件的端口,前端8281:8080,后端8282:8000,修改baseurl.txt地址为http:192.168.1.50:8282
  4. 执行docker-compose up -d
  5. 访问公网IP:8281
Singosgu commented 7 months ago

修改之后,需要quasar build一下

Singosgu commented 7 months ago

你该不会是群晖的nas吧

finalxcode commented 5 months ago

@Singosgu Is this project controlled by permissions specific to different roles?

Singosgu commented 5 months ago

Edit by yourself , use staff_type