Skip to content

Commit

Permalink
docs: update paths for moonraker and klipper
Browse files Browse the repository at this point in the history
  • Loading branch information
mkuf committed Oct 18, 2022
1 parent c17b4ca commit a37a639
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 39 deletions.
40 changes: 19 additions & 21 deletions docker/klipper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Create a configfile `printer.cfg` and a directory `run` and execute:
docker run \
--privileged \
-v /dev:/dev \
-v $(pwd)/run:/ \
-v $(pwd)/printer.cfg:/opt/cfg/printer.cfg \
-v $(pwd)/run:/opt/printer_data/run \
-v $(pwd)/printer.cfg:/opt/printer_data/config/printer.cfg \
mkuf/klipper:latest
```

Expand All @@ -30,8 +30,8 @@ services:
privileged: true
volumes:
- /dev:/dev
- ./printer.cfg:/opt/cfg/printer.cfg
- ./run:/opt/run
- ./printer.cfg:/opt/printer_data/config/printer.cfg
- ./run:/opt/printer_data/run
```
### With Moonraker
Expand All @@ -41,21 +41,21 @@ To limit klippers access to system devices (`/dev`), the printers physical seria

Further Info on how to use the Moonraker Image can be found in its [README.md](../moonraker/README.md)

Create `moonraker.cfg` and `printer.cf` as well as the directories `run` and `gcode`, then run the containers.
Create `moonraker.conf` and `printer.cfg` as well as the directories `run` and `gcode`, then run the containers.

#### Run
```bash
docker run \
--device /dev/ttymxc3:/dev/ttymxc3 \
-v $(pwd)/run:/ \
-v $(pwd)/gcode:/opt/gcode \
-v $(pwd)/printer.cfg:/opt/cfg/printer.cfg \
-v $(pwd)/run:/opt/printer_data/run \
-v $(pwd)/gcode:/opt/printer_data/gcodes \
-v $(pwd)/printer.cfg:/opt/printer_data/config/printer.cfg \
mkuf/klipper:latest
docker run \
-v $(pwd)/run:/ \
-v $(pwd)/gcode:/opt/gcode \
-v $(pwd)/moonraker.cfg:/opt/cfg/moonraker.cfg \
-v $(pwd)/run:/opt/printer_data/run \
-v $(pwd)/gcode:/opt/printer_data/gcodes \
-v $(pwd)/moonraker.conf:/opt/printer_data/config/moonraker.conf \
-p 7125:7125 \
mkuf/moonraker:latest
```
Expand All @@ -68,18 +68,18 @@ services:
devices:
- /dev/ttymxc3:/dev/ttymxc3
volumes:
- ./printer.cfg:/opt/cfg/printer.cfg
- ./run:/opt/run
- ./gcode:/opt/gcode
- ./printer.cfg:/opt/printer_data/config/printer.cfg
- ./run:/opt/printer_data/run
- ./gcode:/opt/printer_data/gcodes
moonraker:
image: mkuf/moonraker:latest
ports:
- "7125:7125"
volumes:
- ./moonraker.cfg:/opt/cfg/moonraker.cfg
- ./run:/opt/run
- ./gcode:/opt/gcode
- ./moonraker.conf:/opt/printer_data/config/moonraker.conf
- ./run:/opt/printer_data/run
- ./gcode:/opt/printer_data/gcodes
```

## Defaults
Expand All @@ -88,17 +88,15 @@ services:
|User| `klipper (1000:1000)` |
|Workdir|`/opt`|
|Entrypoint|`/opt/venv/bin/python klipper/klipper/klippy.py`|
|Cmd|`-I run/klipper.tty -a run/klipper.sock cfg/printer.cfg`|
|Cmd|`-I printer_data/run/klipper.tty -a printer_data/run/klipper.sock printer_data/config/printer.cfg`|

## Ports
none

## Volumes
|Volume|Description|
|---|---|
|`/opt/run`| Default Location for runtime Files generated by Klipper. <br>Namely `klipper.tty`, the emulated Serial device <br>and `klipper.sock`, the unix socket that is used for communation with moonraker |
|`/opt/cfg`|Config directory to host `printer.cfg`|
|`/opt/gcode`|Stores GCODE Files to be used by Klipper|
|`/opt/printer_data`| Default Location for printer data as proposed by Moonraker |

## Tags
|Tag|Description|Static|
Expand Down
34 changes: 16 additions & 18 deletions docker/moonraker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@ _via https://moonraker.readthedocs.io/en/latest/_

## Usage
Moonraker requires Klipper to operate. See the Images' [README.md](../klipper/README.md) on how to run the Klipper Image.
Both Containers need to share their `run` Volume in order to be able to communicate via klippers unix socket. Configure Moonraker to use `/opt/run/klipper.sock` as klippys uds address.
Both Containers need to share their `run` Volume in order to be able to communicate via klippers unix socket. Configure Moonraker to use `/opt/printer_data/run/klipper.sock` as klippys uds address.

Create `moonraker.cfg` and `printer.cf` as well as the directories `run` and `gcode`, then run the containers.
Create `moonraker.conf` and `printer.cfg` as well as the directories `run` and `gcode`, then run the containers.

#### Run
```bash
docker run \
--device /dev/ttymxc3:/dev/ttymxc3 \
-v $(pwd)/run:/ \
-v $(pwd)/gcode:/opt/gcode \
-v $(pwd)/printer.cfg:/opt/cfg/printer.cfg \
-v $(pwd)/run:/printer_data/run \
-v $(pwd)/gcode:/opt/printer_data/gcodes \
-v $(pwd)/printer.cfg:/opt/printer_data/config/printer.cfg \
mkuf/klipper:latest

docker run \
-v $(pwd)/run:/ \
-v $(pwd)/gcode:/opt/gcode \
-v $(pwd)/moonraker.cfg:/opt/cfg/moonraker.cfg \
-v $(pwd)/run:/printer_data/run \
-v $(pwd)/gcode:/opt/printer_data/gcodes \
-v $(pwd)/moonraker.conf:/opt/printer_data/config/moonraker.conf \
-p 7125:7125 \
mkuf/moonraker:latest
```
Expand All @@ -36,18 +36,18 @@ services:
devices:
- /dev/ttymxc3:/dev/ttymxc3
volumes:
- ./printer.cfg:/opt/cfg/printer.cfg
- ./run:/opt/run
- ./gcode:/opt/gcode
- ./printer.cfg:/opt/printer_data/conf/printer.cfg
- ./run:/opt/printer_data/run
- ./gcode:/opt/printer_data/gcodes

moonraker:
image: mkuf/moonraker:latest
ports:
- "7125:7125"
volumes:
- ./moonraker.cfg:/opt/cfg/moonraker.cfg
- ./run:/opt/run
- ./gcode:/opt/gcode
- ./moonraker.conf:/opt/printer_data/conf/moonraker.conf
- ./run:/opt/printer_data/run
- ./gcode:/opt/printer_data/gcodes
```
## Defaults
Expand All @@ -56,7 +56,7 @@ services:
|User| `moonraker (1000:1000)` |
|Workdir|`/opt`|
|Entrypoint|`/opt/venv/bin/python moonraker/moonraker/moonraker.py`|
|Cmd|`-c cfg/moonraker.cfg`|
|Cmd|`-d /opt/printer_data/`|

## Ports
|Port|Description|
Expand All @@ -66,9 +66,7 @@ services:
## Volumes
|Volume|Description|
|---|---|
|`/opt/run`| Default Location for runtime Files generated by Klipper. Used to access `klipper.sock`, the unix socket that is used for communation with klipper |
|`/opt/cfg`|Config directory to host `moonraker.cfg`|
|`/opt/gcode`|Stores uploaded GCODE Files|
|`/opt/printer_data`| Default Location for printer data by Moonraker |

## Tags
|Tag|Description|Static|
Expand Down

0 comments on commit a37a639

Please sign in to comment.