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

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

Closed
maksalees opened this issue Apr 11, 2023 · 13 comments
Labels
🦄 Feature Request [ISSUE] Suggestion for new feature, update or change

Comments

@maksalees
Copy link

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 maksalees added the 🦄 Feature Request [ISSUE] Suggestion for new feature, update or change label Apr 11, 2023
@liss-bot
Copy link
Collaborator

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

@liss-bot
Copy link
Collaborator

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 liss-bot added the ⚰️ Stale [ISSUE] [PR] No activity for over 1 month label May 12, 2023
@maksalees
Copy link
Author

Still an issue

@liss-bot liss-bot added 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending and removed ⚰️ Stale [ISSUE] [PR] No activity for over 1 month labels May 12, 2023
@maksalees
Copy link
Author

Any progress?

@liss-bot liss-bot removed the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Jul 18, 2023
@rokiden
Copy link
Contributor

rokiden commented Sep 22, 2023

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:

const backupFilePath = `${settings.defaultLocation}${usersFileName || settings.filename}-`

@liss-bot liss-bot added the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Sep 22, 2023
@liss-bot
Copy link
Collaborator

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 liss-bot added the ⚰️ Stale [ISSUE] [PR] No activity for over 1 month label Dec 22, 2023
@maksalees
Copy link
Author

Still an issue

@liss-bot liss-bot removed the ⚰️ Stale [ISSUE] [PR] No activity for over 1 month label Dec 22, 2023
@CrazyWolf13
Copy link
Collaborator

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.

@maksalees
Copy link
Author

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 Lissy93 closed this as completed Feb 11, 2024
@liss-bot liss-bot removed the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Feb 11, 2024
@maksalees
Copy link
Author

maksalees commented Feb 11, 2024

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

@CrazyWolf13 CrazyWolf13 reopened this Feb 11, 2024
@enpaul
Copy link

enpaul commented Mar 4, 2024

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

@liss-bot liss-bot added the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Mar 4, 2024
@Lissy93
Copy link
Owner

Lissy93 commented Mar 6, 2024

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.

@liss-bot liss-bot removed the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Mar 6, 2024
@CrazyWolf13
Copy link
Collaborator

Hi
This should now be fixed within the new V3 release of dashy, take a look here #1537 and here #1529

Keep in mind V3 has breaking changes, update the volumes and the port accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🦄 Feature Request [ISSUE] Suggestion for new feature, update or change
Projects
None yet
Development

No branches or pull requests

6 participants