Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small improvements #110

Merged
merged 1 commit into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/image-build-klipper.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ jobs:
app: klipper
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/image-build-klipperscreen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ jobs:
app: klipperscreen
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/image-build-moonraker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ jobs:
app: moonraker
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/image-build-ustreamer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ jobs:
app: ustreamer
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/image-docs-klipper.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
short-description: "Klipper is a 3d-Printer firmware."
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/image-docs-klipperscreen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
short-description: "KlipperScreen is a touchscreen GUI that interfaces with Klipper via Moonraker."
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/image-docs-moonraker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
short-description: "Web API used to interact with the 3D printing firmware Klipper."
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/image-docs-ustreamer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
short-description: "µStreamer is a lightweight and very quick server to stream MJPEG video"
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
11 changes: 11 additions & 0 deletions .github/workflows/pr-yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: YAML Lint

on: pull_request

jobs:
yamllint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run yamllint
uses: reviewdog/action-yamllint@v1
20 changes: 10 additions & 10 deletions .github/workflows/template-image-docs-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ jobs:
image-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Update Docker Hub Description"
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: ${{ secrets.DOCKERHUB_USERNAME }}/${{ inputs.app }}
short-description: ${{ inputs.short-description }}
readme-filepath: ./docker/${{ inputs.app }}/README.md
enable-url-completion: true
- uses: actions/checkout@v4
- name: "Update Docker Hub Description"
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: ${{ secrets.DOCKERHUB_USERNAME }}/${{ inputs.app }}
short-description: ${{ inputs.short-description }}
readme-filepath: ./docker/${{ inputs.app }}/README.md
enable-url-completion: true
9 changes: 9 additions & 0 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
extends: default

rules:
document-start:
present: false
line-length:
max: 180
truthy:
check-keys: false
4 changes: 2 additions & 2 deletions config/octoprint.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
serial:
additionalPorts:
- /opt/printer_data/run/klipper.tty
- /opt/printer_data/run/klipper.tty
autoconnect: true
port: /opt/printer_data/run/klipper.tty
webcam:
snapshot: http://webcam:8080/snapshot
stream: /webcam/stream
accessControl:
userfile: /octoprint/octoprint/users.yaml
userfile: /octoprint/octoprint/users.yaml
14 changes: 11 additions & 3 deletions custom/docker-compose.custom.glances.override.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,22 @@
## * https://github.com/nicolargo/glances is used to generate and display metrics
##
## Setup
## 1. Add your personal config to this file and copy it to the root of the repository, overwriting the existing docker-compose.override.yaml
## 1. Add your personal config to this file and copy it to the root of the repository,
## overwriting the existing docker-compose.override.yaml
## 2. start the stack as described in the main readme using profiles of your choice

## Ustreamer base Service
x-ustreamer-svc: &ustreamer-svc
image: mkuf/ustreamer:latest
restart: unless-stopped
command: --host=0.0.0.0 --port=8080 --slowdown --device=/dev/webcam --resolution=1280x960 --format=MJPEG --desired-fps=30
command: >
--host=0.0.0.0
--port=8080
--slowdown
--device=/dev/webcam
--resolution=1280x960
--format=MJPEG
--desired-fps=30

## Add your personal config here
services:
Expand Down Expand Up @@ -54,4 +62,4 @@ services:
traefik.http.routers.webcam.rule: PathPrefix(`/webcam`)
traefik.http.routers.webcam.entrypoints: web
traefik.http.middlewares.webcam.stripprefix.prefixes: /webcam
traefik.http.routers.webcam.middlewares: webcam
traefik.http.routers.webcam.middlewares: webcam
17 changes: 13 additions & 4 deletions custom/docker-compose.custom.moonraker-timelapse.override.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,29 @@
## * timelapses will be saved to `/opt/timelapse` on the host machine
##
## Setup
## 1. Add the gcode macros provided by moonraker-timelapse to your printers configuration file https://github.com/mainsail-crew/moonraker-timelapse/blob/main/klipper_macro/timelapse.cfg
## 1. Add the gcode macros provided by moonraker-timelapse to your printers configuration file
## https://github.com/mainsail-crew/moonraker-timelapse/blob/main/klipper_macro/timelapse.cfg
## 2. Add the following to your moonraker.conf
## ```
## [timelapse]
## output_path: /opt/timelapse/
## ```
## 3. Add your personal config to this file and copy it to the root of the repository, overwriting the existing docker-compose.override.yaml
## 3. Add your personal config to this file and copy it to the root of the repository,
## overwriting the existing docker-compose.override.yaml
## 4. start the stack as described in the main readme using mainsail or fluidd as profile

## Ustreamer base Service
x-ustreamer-svc: &ustreamer-svc
image: mkuf/ustreamer:latest
restart: unless-stopped
command: --host=0.0.0.0 --port=8080 --slowdown --device=/dev/webcam --resolution=1280x960 --format=MJPEG --desired-fps=30
command: >
--host=0.0.0.0
--port=8080
--slowdown
--device=/dev/webcam
--resolution=1280x960
--format=MJPEG
--desired-fps=30

## Add your personal config here
services:
Expand Down Expand Up @@ -68,4 +77,4 @@ services:
traefik.http.routers.webcam.rule: PathPrefix(`/webcam`)
traefik.http.routers.webcam.entrypoints: web
traefik.http.middlewares.webcam.stripprefix.prefixes: /webcam
traefik.http.routers.webcam.middlewares: webcam
traefik.http.routers.webcam.middlewares: webcam
35 changes: 28 additions & 7 deletions custom/docker-compose.custom.multiple-printers.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Usecase: Run multiple Printers on the same Host
##
## Assumptions:
## Assumptions:
## * I have two printers
## * One is called printer1, the other one printer2
## * printer1 is using serial port /dev/ttyUSB0 and webcam /dev/video0
Expand Down Expand Up @@ -55,7 +55,14 @@ x-moonraker-svc: &moonraker-svc
x-ustreamer-svc: &ustreamer-svc
image: mkuf/ustreamer:latest
restart: unless-stopped
command: --host=0.0.0.0 --port=8080 --slowdown --device=/dev/webcam --resolution=1280x960 --format=MJPEG --desired-fps=30
command: >
--host=0.0.0.0
--port=8080
--slowdown
--device=/dev/webcam
--resolution=1280x960
--format=MJPEG
--desired-fps=30

## Service Definitions
services:
Expand All @@ -64,13 +71,20 @@ services:
## Access api via port 8101/tcp and webcam via 8102/tcp
printer1-klipper:
<<: *klipper-svc
command: -I printer_data/run/printer1.klipper.tty -a printer_data/run/printer1.klipper.sock printer_data/config/printer1.cfg -l printer_data/logs/printer1.klippy.log
command: >
-I printer_data/run/printer1.klipper.tty
-a printer_data/run/printer1.klipper.sock
printer_data/config/printer1.cfg
-l printer_data/logs/printer1.klippy.log
labels:
org.prind.service: klipper
org.prind.printer: printer1
printer1-moonraker:
<<: *moonraker-svc
command: -d printer_data -c printer_data/config/printer1.moonraker.conf -l printer_data/logs/printer1.moonraker.log
command: >
-d printer_data
-c printer_data/config/printer1.moonraker.conf
-l printer_data/logs/printer1.moonraker.log
ports:
- 8101:7125
labels:
Expand All @@ -90,13 +104,20 @@ services:
## Access api via port 8201/tcp and webcam via 8202/tcp
printer2-klipper:
<<: *klipper-svc
command: -I printer_data/run/printer2.klipper.tty -a printer_data/run/printer2.klipper.sock printer_data/config/printer2.cfg -l printer_data/logs/printer2.klippy.log
command: >
-I printer_data/run/printer2.klipper.tty
-a printer_data/run/printer2.klipper.sock
printer_data/config/printer2.cfg
-l printer_data/logs/printer2.klippy.log
labels:
org.prind.service: klipper
org.prind.printer: printer2
printer2-moonraker:
<<: *moonraker-svc
command: -d printer_data -c printer_data/config/printer2.moonraker.conf -l printer_data/logs/printer2.moonraker.log
command: >
-d printer_data
-c printer_data/config/printer2.moonraker.conf
-l printer_data/logs/printer2.moonraker.log
ports:
- 8201:7125
labels:
Expand Down Expand Up @@ -124,4 +145,4 @@ services:
volumes:
run:
gcode:
log:
log:
17 changes: 14 additions & 3 deletions custom/docker-compose.custom.portainer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ services:
depends_on:
init:
condition: service_completed_successfully
command: -I printer_data/run/klipper.tty -a printer_data/run/klipper.sock printer_data/config/printer.cfg -l printer_data/logs/klippy.log
command: >
-I printer_data/run/klipper.tty
-a printer_data/run/klipper.sock
printer_data/config/printer.cfg
-l printer_data/logs/klippy.log
volumes:
- /dev:/dev
- ./config:/opt/printer_data/config
Expand Down Expand Up @@ -70,7 +74,14 @@ services:
webcam:
image: mkuf/ustreamer:latest
restart: unless-stopped
command: --host=0.0.0.0 --port=8080 --slowdown --device=/dev/webcam --resolution=1280x960 --format=MJPEG --desired-fps=30
command: >
--host=0.0.0.0
--port=8080
--slowdown
--device=/dev/webcam
--resolution=1280x960
--format=MJPEG
--desired-fps=30
devices:
- /dev/video0:/dev/webcam
labels:
Expand Down Expand Up @@ -111,7 +122,7 @@ services:
- "80:80"
restart: unless-stopped
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
labels:
org.prind.service: traefik

Expand Down
18 changes: 13 additions & 5 deletions custom/docker-compose.custom.unique-uid-gid.override.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,25 @@
## * init container will set the permissions to the new UID/GID
##
## Setup
## 1. Add your personal config to this file and copy it to the root of the repository, overwriting the existing docker-compose.override.yaml
## 2. Replace the example UID and GID of '4242' in the 'dockerfile_inline' block of the klipper and moonraker services,
## 1. Add your personal config to this file and copy it to the root of the repository,
## overwriting the existing docker-compose.override.yaml
## 2. Replace the example UID and GID of '4242' in the 'dockerfile_inline' block of the klipper and moonraker services,
## as well as in the command of the init service with your specific requirements.
## Make sure to use the identical UIDs/GIDs in klipper and moonraker.
## 3. start the stack as described in the main readme using a profile of your choice.
## 3. start the stack as described in the main readme using a profile of your choice.

## Ustreamer base Service
x-ustreamer-svc: &ustreamer-svc
image: mkuf/ustreamer:latest
restart: unless-stopped
command: --host=0.0.0.0 --port=8080 --slowdown --device=/dev/webcam --resolution=1280x960 --format=MJPEG --desired-fps=30
command: >
--host=0.0.0.0
--port=8080
--slowdown
--device=/dev/webcam
--resolution=1280x960
--format=MJPEG
--desired-fps=30

## Add your personal config here
services:
Expand Down Expand Up @@ -60,4 +68,4 @@ services:
traefik.http.routers.webcam.rule: PathPrefix(`/webcam`)
traefik.http.routers.webcam.entrypoints: web
traefik.http.middlewares.webcam.stripprefix.prefixes: /webcam
traefik.http.routers.webcam.middlewares: webcam
traefik.http.routers.webcam.middlewares: webcam
2 changes: 1 addition & 1 deletion docker-compose.extra.calibrate-shaper.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ services:
entrypoint: python3 /opt/klipper/scripts/calibrate_shaper.py
working_dir: /opt/resonances
volumes:
- ./resonances:/opt/resonances
- ./resonances:/opt/resonances
2 changes: 1 addition & 1 deletion docker-compose.extra.make.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ services:
volumes:
- /dev:/dev
- ./config/build.config:/opt/klipper/.config
- ./out:/opt/klipper/out
- ./out:/opt/klipper/out
10 changes: 7 additions & 3 deletions docker-compose.extra.simulavr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,24 @@ services:
build:
context: docker/klipper
target: build-simulavr
args:
args:
VERSION: master
privileged: true
volumes:
- /dev:/dev
- run:/opt/printer_data/run
labels:
org.prind.service: simulavr

## Reconfigure Klipper service for simulavr
klipper:
depends_on:
init:
condition: service_completed_successfully
simulavr:
condition: service_started
command: -I printer_data/run/klipper.tty -a printer_data/run/klipper.sock printer_data/config/printer-simulavr.cfg -l printer_data/logs/klippy.log
command: >
-I printer_data/run/klipper.tty
-a printer_data/run/klipper.sock
printer_data/config/printer-simulavr.cfg
-l printer_data/logs/klippy.log
Loading