From 760cb1358f834e4e7164a7d3a840055f3ab5c0d5 Mon Sep 17 00:00:00 2001 From: Dieter Schmidt Date: Sat, 29 May 2021 18:13:44 +0200 Subject: [PATCH] update moonraker build & config - add Rust toolchain - update config - update authorization - add database config - add docker volume mount for moonraker database persistence --- config/moonraker.conf | 7 +++---- docker-compose.yml | 3 +++ klipper/Dockerfile | 3 ++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/config/moonraker.conf b/config/moonraker.conf index c3ea131..7c3bd99 100755 --- a/config/moonraker.conf +++ b/config/moonraker.conf @@ -1,14 +1,13 @@ [server] host: 0.0.0.0 port: 7125 -enable_debug_logging: True +enable_debug_logging: False config_path: /home/klippy/.config +database_path: /home/klippy/.moonraker/database [authorization] -enabled: True -api_key_file: /home/klippy/.moonraker_api_key cors_domains: - http://* + http://*.local trusted_clients: 10.0.0.0/8 127.0.0.0/8 diff --git a/docker-compose.yml b/docker-compose.yml index 05d2fa8..6b84ea4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -18,6 +18,7 @@ services: # be aware to create your own branch if you mount the config folder as it will be updated on the main branch # that way you can merge upstream changes to your customized configs - ./config:/home/klippy/.config + - moonraker_data:/home/klippy/.moonraker # - <>:/home/klippy/.config # - ./printer.cfg:/home/klippy/.config/printer.cfg # mount serial device - take care to grant sufficient permissions to the device: : @@ -87,3 +88,5 @@ services: volumes: gcode_files: + moonraker_data: + diff --git a/klipper/Dockerfile b/klipper/Dockerfile index 171d60c..452b163 100644 --- a/klipper/Dockerfile +++ b/klipper/Dockerfile @@ -9,7 +9,7 @@ ARG MOONRAKER_VENV_DIR=${HOME}/moonraker-env RUN useradd -d ${HOME} -ms /bin/bash ${USER} RUN apt-get update && \ - apt-get install -y locales git sudo wget gzip tar python-virtualenv virtualenv python-dev libffi-dev libncurses-dev libusb-dev gpiod python3-virtualenv python3-dev libopenjp2-7 python3-libgpiod + apt-get install -y locales git sudo wget curl gzip tar python-virtualenv virtualenv python-dev libffi-dev libncurses-dev libusb-dev gpiod python3-virtualenv python3-dev libopenjp2-7 python3-libgpiod RUN sed -i -e 's/# en_GB.UTF-8 UTF-8/en_GB.UTF-8 UTF-8/' /etc/locale.gen RUN locale-gen @@ -32,6 +32,7 @@ RUN git clone https://github.com/Arksine/moonraker.git RUN [ ! -d ${MOONRAKER_VENV_DIR} ] && python3 -m venv ${MOONRAKER_VENV_DIR} RUN ${MOONRAKER_VENV_DIR}/bin/python -m pip install pip -U RUN ${MOONRAKER_VENV_DIR}/bin/pip install wheel gpiod +RUN curl https://sh.rustup.rs -sSf | sh -s -- --profile minimal -y RUN ${MOONRAKER_VENV_DIR}/bin/pip install -r moonraker/scripts/moonraker-requirements.txt FROM python:3.9-slim as image