dashy
dashy copied to clipboard
[FEATURE_REQUEST] Ability to specify a different directory for config and its backups
Is your feature request related to a problem? If so, please describe.
This will make it possible to store the compiled Dashy in a read-only directory, and give the config from outside of it. For example, this is needed to package Dashy for Nix normally.
Describe the solution you'd like
Ability to specify another directory for configs and their backups e.g. with an argument. To get something like node server -c /etc/dashy.
Priority
Medium (Would be very useful)
Is this something you would be keen to implement
None
If you're enjoying Dashy, consider dropping us a ⭐
🤖 I'm a bot, and this message was automated
This issue has gone 6 weeks without an update. To keep the ticket open, please indicate that it is still relevant in a comment below. Otherwise it will be closed in 5 working days.
Still an issue
Any progress?
Moving main config file can be a bit tricky, because it must be in http root, but backups can be stored anywhere. For me, it would be enough to create config parameter for backup path.
I have issue in my case too: podman container started with non-root user, config.yml mounted with correct permissions, but I can't save from webpage beacuse /public haven't write permissions for others and backup couldn't be created.
I think it would be easy to make some changes here: https://github.com/Lissy93/dashy/blob/edeeb74c6ce1f86ae1806f1839723b640c326ace/services/save-config.js#L27
This issue has gone 3 months without an update. To keep the ticket open, please indicate that it is still relevant in a comment below. Otherwise it will be closed in 5 working days.
Still an issue
A fix to your Feature Request on the backup path has been submitted and accepted.
Moving the conf.yml is indeed a difficult task and has already been submitted here: https://github.com/Lissy93/dashy/pull/1393
See also #693
So this is a duplicate.
A fix to your Feature Request on the backup path has been submitted and accepted.
Moving the conf.yml is indeed a difficult task and has already been submitted here: #1393
See also #693
So this is a duplicate.
In #1393 the config is simply moved to a directory inside the source code, which does not solve my problem.
@Lissy93 As I wrote above, the other issue did not add a configuration option to specify the config directory, but simply moved it to a folder inside the source code. This prevents Dashy from being stored in a read-only directory, serving the config from outside, making it impossible to create a package for Nix with support for configuration from the application. So this is not a duplicate. Please reopen the issue.
:+1: for this issue. I'm currently unable to deploy Dashy on Docker Swarm because swarm mode volumes only support directory binding. Because Dashy stores conf.yml in the /app/public a directory mount would overwrite the public web resources. My best option right now is to:
- Launch a container with a volume mounted elsewhere in the container
- Copy the contents of
/app/publicinto the volume - Stop the container
- Relaunch the container with the volume mounted over
/app/public
This makes updates, backups, and storage quite cumbersome. Being able to specify the config location either via CLI (i.e. --config /path/to/config) or environment variable (i.e. DASH_CONFIG=/path/to/config) would be very helpful.
Yeah, mounting a file is definitely not great, I get that. I have got plans to update it, so that it's a directory mounted instead of a single file, but it would be a breaking change, so will be in the next major version (3.0.0)
The content of /public changes very rarely, so although not ideal, in the meantime you could copy and mount that.
Hi This should now be fixed within the new V3 release of dashy, take a look here https://github.com/Lissy93/dashy/discussions/1537 and here https://github.com/Lissy93/dashy/discussions/1529
Keep in mind V3 has breaking changes, update the volumes and the port accordingly.