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

Docker image does not distiguish data and config folders #18794

Closed
nettnikl opened this issue Aug 30, 2023 · 6 comments
Closed

Docker image does not distiguish data and config folders #18794

nettnikl opened this issue Aug 30, 2023 · 6 comments
Labels
problem Something isn't working stale Stale issues

Comments

@nettnikl
Copy link

nettnikl commented Aug 30, 2023

What happened?

Splitting data and config from each other is widely considered a best practice. However, for this /app/data/ has to be used not for config files.

What did you expect to happen?

Mounting possible with data as rw and config as ro.

    volumes:
      - ./zigbee2mqtt-config/configuration.yaml:/app/data/configuration.yaml:ro
      - ./zigbee2mqtt-config/custom-adapter.js:/app/data/custom-adapter.js:ro
      - ./zigbee2mqtt-data:/app/config:rw

But it is required to ensure, the start script does not copy stuff around (especially not only in the initial case), so if the config is changed afterwards, the change is reflected.

EDIT: #4697 includes a similar discussion.

Zigbee2MQTT version

latest

@nettnikl nettnikl added the problem Something isn't working label Aug 30, 2023
@Hypfer
Copy link

Hypfer commented Sep 27, 2023

To my understanding, the config file needs to be writable so that configuration via the frontend works.

is widely considered a best practice

Any source on that? And why does that matter? Sounds like just an opinion to me

@nettnikl
Copy link
Author

Well, any best-practise could be considered 'an opinion' - but i'd argue that in most OS' programs are generally pushed to split those.
For security (in cloud env e.g. making configs readonly) and maintanability (easy data resets with losing configs). E.g. /etc and /bin or the AppData and Programs directories.

@nettnikl
Copy link
Author

A config file the program has to write to sounds like an unusual design choice to me. Not inherently a bad one, but for me an non cloud friendly one. For example, I like to reset my systems by deleting the data, while keeping the settings - similar to what MS started to offer for soft resetting Windows and what docker containers generally do on recreation (unless you specified to keep the data at a specific location via the volumes).

Copy link
Contributor

github-actions bot commented Nov 4, 2023

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the stale Stale issues label Nov 4, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 12, 2023
@nettnikl
Copy link
Author

This is very disappointing.

@nettnikl
Copy link
Author

I'd be thankful if i could get any reason for why this was closed. If it is not planned, i'm sure you have a good reason not to, i'd be interested to hear about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
problem Something isn't working stale Stale issues
Projects
None yet
Development

No branches or pull requests

2 participants