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

How to make settings persistant? #836

Open
4 of 13 tasks
Elespecia opened this issue Jul 29, 2023 · 5 comments
Open
4 of 13 tasks

How to make settings persistant? #836

Elespecia opened this issue Jul 29, 2023 · 5 comments

Comments

@Elespecia
Copy link

Elespecia commented Jul 29, 2023

Description

I'm sick of having to make all the settings every now and then, and everytime I redeploy the Docker-image (yes, I'm running the contianerversion).

I fail to see any file that I can bind with Docker but also have limited knowledge of you NPM and NodeJS work.

Thanks for a great CNC-router controller though. It's awesome when it works :)

Versions

  • CNCjs: All versions (Currently at 1.10.3)

How Do You Install CNCjs?

  • NPM
  • Download the CNCjs Desktop Application
  • Docker-compose
version: "3.7"
services:
  cncjs:
    container_name: CNCjs
    image: cncjs/cncjs:latest
    ports:
      - "8005:8000"
    volumes:
      - /docker/CNCjs:/cncjs
    network_mode: bridge
    hostname: cncjs
    restart: unless-stopped
    devices:
      - /dev/ttyUSB0:/dev/ttyUSB0

CNC Controller

  • Grbl
  • Smoothieware
  • TinyG/g2core

Hardware

  • Raspberry Pi
  • Desktop or Laptop
  • Mobile Device

Operating System

  • Not Applicable
  • Windows
  • Mac
  • Linux
@thijstriemstra
Copy link
Contributor

Good question; but I think it's a session/cookie thing, meaning it's only persisted in the browser. I'd love to be proven wrong though.

@Elespecia
Copy link
Author

I think you're right.
That's not ideal with machine settings, macros and configurations.

@onezero1010101
Copy link

So I think I might have this fixed, try these volumes and see if that helps. The .cncjs-sessions is a folder, .cncrc is a file. You will need to create a blank file for the .cncrc, or it will create a folder

name: cncjs
services:
  cncjs:
    container_name: cnc
    image: cncjs/cncjs:latest
    privileged: true
    ports:
      - 80:8000
    volumes:
      - ./cncjs/.cncjs-sessions:/root/.cncjs-sessions
      - ./cncjs/.cncrc:/root/.cncrc

@Elespecia
Copy link
Author

Thanks for the advice but there is no files in my .cncjs-sessions and the .cncrc only involve a token to a session where the settings are stored.
To not loose all my settings once again I need to extract the settings prior to recreating the container but no settings are to be found.

However, locating the secret is one of two keys for persistance I think.

@Elespecia
Copy link
Author

Perhaps the key is to figure out where cncjs-app-1.10.3.json is located and after exported have it bound.
But where is is located? I think the devs can tell us in a second if they look at this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants