From a41b01d06c94ec205f3fa79835115c9ad4811adb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20K=C3=BCffner?= Date: Fri, 27 Oct 2023 22:58:18 +0200 Subject: [PATCH] custom: simplify moonraker-timelapse setup --- CHANGELOG.md | 3 ++- ...ose.custom.moonraker-timelapse.override.yaml | 17 ++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1cd4e8b..0269a8d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Added ### Fixed ### Changed -- pin base images to python:3.11-(slim-)bookworm +- docker: pin base images to python:3.11-(slim-)bookworm +- extra: simplify moonraker-timelapse setup ### Removed --> diff --git a/custom/docker-compose.custom.moonraker-timelapse.override.yaml b/custom/docker-compose.custom.moonraker-timelapse.override.yaml index 9fbbbb0..ea554ba 100644 --- a/custom/docker-compose.custom.moonraker-timelapse.override.yaml +++ b/custom/docker-compose.custom.moonraker-timelapse.override.yaml @@ -14,18 +14,14 @@ ## * timelapses will be saved to `/opt/timelapse` on the host machine ## ## Setup -## 1. Check out the timelapse code to `../` relative to the root of this repository -## ``` -## git clone https://github.com/mainsail-crew/moonraker-timelapse ../moonraker-timelapse -## ``` -## 2. 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 -## 3. Add the following to your moonraker.conf +## 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/ ## ``` -## 4. Add your personal config to this file and copy it to the root of the repository, overwriting the existing docker-compose.override.yaml -## 5. start the stack as described in the main readme using mainsail or fluidd as profile +## 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 @@ -39,14 +35,17 @@ services: image: moonraker:ffmpeg build: dockerfile_inline: | + FROM alpine/git as pull + RUN git clone https://github.com/mainsail-crew/moonraker-timelapse /opt/moonraker-timelapse FROM mkuf/moonraker:latest USER root RUN apt update \ && apt install -y ffmpeg wget \ && apt clean USER moonraker + COPY --chown=moonraker:moonraker --from=pull /opt/moonraker-timelapse /opt/moonraker-timelapse + RUN ln -s /opt/moonraker-timelapse/component/timelapse.py /opt/moonraker/moonraker/components/timelapse.py volumes: - - /opt/moonraker-timelapse/component/timelapse.py:/opt/moonraker/moonraker/components/timelapse.py - /opt/timelapse:/opt/timelapse - /dev/null:/opt/klipper/config/null - /dev/null:/opt/klipper/docs/null