dashy icon indicating copy to clipboard operation
dashy copied to clipboard

[FEATURE_REQUEST] Ability to specify a different directory for config and its backups

Open maksalees opened this issue 2 years ago • 7 comments

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

maksalees avatar Apr 11 '23 16:04 maksalees

If you're enjoying Dashy, consider dropping us a ⭐
🤖 I'm a bot, and this message was automated

liss-bot avatar Apr 11 '23 16:04 liss-bot

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.

liss-bot avatar May 12 '23 01:05 liss-bot

Still an issue

maksalees avatar May 12 '23 11:05 maksalees

Any progress?

maksalees avatar Jul 17 '23 12:07 maksalees

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

rokiden avatar Sep 22 '23 13:09 rokiden

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.

liss-bot avatar Dec 22 '23 01:12 liss-bot

Still an issue

maksalees avatar Dec 22 '23 12:12 maksalees

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.

CrazyWolf13 avatar Feb 03 '24 19:02 CrazyWolf13

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.

maksalees avatar Feb 03 '24 20:02 maksalees

@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.

maksalees avatar Feb 11 '24 18:02 maksalees

:+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:

  1. Launch a container with a volume mounted elsewhere in the container
  2. Copy the contents of /app/public into the volume
  3. Stop the container
  4. 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.

enpaul avatar Mar 04 '24 22:03 enpaul

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.

Lissy93 avatar Mar 06 '24 00:03 Lissy93

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.

CrazyWolf13 avatar Apr 21 '24 16:04 CrazyWolf13