klipper-web-control-docker icon indicating copy to clipboard operation
klipper-web-control-docker copied to clipboard

Align with printer data folder

Open speendo opened this issue 2 years ago • 5 comments

These changes align the docker project's folders with the moonraker defaults (see https://moonraker.readthedocs.io/en/latest/installation/#data-folder-structure).

This should solve a couple of tickets, e.g.

  • https://github.com/dimalo/klipper-web-control-docker/issues/44
  • https://github.com/dimalo/klipper-web-control-docker/issues/45

Note, that I altered some directory bindings, therefore some slight changes in docker-compose.yml are necessary.

speendo avatar Dec 09 '22 13:12 speendo

Hey speendo!

Thanks that you answered my issue!

I will test this out later. Whenever I faced with that issue I solved somehow and generated an another one as usual.

harleckinz avatar Dec 21 '22 13:12 harleckinz

Looks like this branch fails with:

klipper     | [moonraker.py:add_warning()] - Moonraker instance running inside a container, cannot validate service file.
klipper     | [eventloop.py:_wrapper()] - Error Running Callback
klipper     | Traceback (most recent call last):
klipper     |   File "/home/klippy/moonraker/moonraker/eventloop.py", line 73, in _wrapper
klipper     |     await ret
klipper     |   File "/home/klippy/moonraker/moonraker/moonraker.py", line 175, in server_init
klipper     |     await self.start_server()
klipper     |   File "/home/klippy/moonraker/moonraker/moonraker.py", line 180, in start_server
klipper     |     await extm.start_unix_server()
klipper     |   File "/home/klippy/moonraker/moonraker/components/extensions.py", line 118, in start_unix_server
klipper     |     comms_path.mkdir()
klipper     |   File "/usr/local/lib/python3.10/pathlib.py", line 1175, in mkdir
klipper     |     self._accessor.mkdir(self, mode)
klipper     | PermissionError: [Errno 13] Permission denied: '/home/klippy/printer_data/comms'

Mx772 avatar Jan 10 '23 19:01 Mx772

Also results in:

klipper     | 2023-01-10 19:18:29,605 INFO success: moonraker entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
klipper     | 2023-01-10 19:18:30,607 INFO spawned: 'klipper_mcu' with pid 30
klipper     | 2023-01-10 19:18:30,606 - supervisord_dependent_startup - [INFO   ] 
klipper     | 2023-01-10 19:18:30,606 - supervisord_dependent_startup - [INFO   ] New event: Service moonraker went from STARTING to RUNNING
klipper     | 2023-01-10 19:18:30,611 - supervisord_dependent_startup - [INFO   ] Services:
klipper     | Got error -1 in sched_setscheduler: (1)Operation not permitted
klipper     | 2023-01-10 19:18:30,613 WARN exited: klipper_mcu (exit status 255; not expected)
klipper     | 2023-01-10 19:18:30,612 - supervisord_dependent_startup - [INFO   ]  - klipper           RUNNING                         dependent_startup: True 
klipper     | 2023-01-10 19:18:30,614 - supervisord_dependent_startup - [INFO   ]  - klipper_mcu       BACKOFF                         dependent_startup: True 
klipper     | 2023-01-10 19:18:30,615 - supervisord_dependent_startup - [INFO   ]  - moonraker         RUNNING                         dependent_startup: True   wait_for: 'klipper:RUNNING'
klipper     | 2023-01-10 19:18:30,616 - supervisord_dependent_startup - [INFO   ] Services not yet running (1): klipper_mcu
klipper     | RESULT 2

Mx772 avatar Jan 10 '23 19:01 Mx772

@speendo's fork works for me and fixes the issues I had with this repo.

Note I did have to make one change and have submitted a PR to his PR (inception!) - https://github.com/speendo/klipper-web-control-docker/pull/1

sammcj avatar Jan 11 '23 09:01 sammcj

Tested. This PR solved quite a few headaches. Thank you @speendo

unsplorer avatar Oct 22 '23 12:10 unsplorer