TheSpaghettiDetective / obico-server

Obico is a community-built, open-source smart 3D printing platform used by makers, enthusiasts, and tinkerers around the world.
https://obico.io
GNU Affero General Public License v3.0
1.47k stars 297 forks source link

[BUG] Portainer can't find manage.py #987

Open spusuf opened 3 months ago

spusuf commented 3 months ago

When the image or git is pulled then started using docker compose up -d the server starts as expected, but using Portainer to launch results in obico-web logs showing:

python: can't open file '/app/manage.py': [Errno 2] No such file or directory
python: can't open file '/app/manage.py': [Errno 2] No such file or directory
python: can't open file '/app/manage.py': [Errno 2] No such file or directory

And obico-tasks logs show:

Usage: celery [OPTIONS] COMMAND [ARGS]...
Try 'celery --help' for help
Error: Invalid value for '-A' / '--app':
Unable to load celery application.

However changing the backend volume in docker-compose.yml from - ./backend:/app to: - ./backend:/backend works

Adding the line -./backend:/appdoes not work.

Is there a reason why the frontend volume points to the frontend directory, but backend points to a directory that doesn't exist in the root folder? Again this is only an issue in Portainer but the fix works for docker compose.

Just want to get a little bit of insight as to why it's set up this way and what I need to fix in a PR to get working on both platforms.

kennethjiang commented 3 months ago

"./backend" should be mapped to "/app" in the container. It was for backward compatibility.

goandfix commented 1 month ago

I have the same problem. Like a work arodun I had to download the github manually and run with portainer.

Wetzel402 commented 2 weeks ago

I tried this but then see these warning...

?: (staticfiles.W004) The directory '/app/../frontend/builds' in the STATICFILES_DIRS setting does not exist.
?: (staticfiles.W004) The directory '/app/../frontend/static' in the STATICFILES_DIRS setting does not exist.

and this error...

ValueError: Missing staticfiles manifest entry for 'vendor/css/sweetalert2.min.css'