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

[Help] Possible to auto import a backup on container startup? #879

Closed
2 tasks done
troodes opened this issue Nov 4, 2021 · 5 comments
Closed
2 tasks done

[Help] Possible to auto import a backup on container startup? #879

troodes opened this issue Nov 4, 2021 · 5 comments
Labels

Comments

@troodes
Copy link

troodes commented Nov 4, 2021

⚠️ Please verify that this bug has NOT been raised before.

  • I checked and didn't find similar issue

🛡️ Security Policy

📝 Describe your problem

Great tool, love the simplicity of it.

I'm wondering if there is a way to have the app restore the settings from a backed up .json file on docker startup?Perhaps by mounting the .json backup to a specific location and having the app restore it at startup?

My use case is I'd like to create a bunch of canned monitor .json configs to use, and then fire up the docker container pointing at one of them in order to avoid having to use the UI to manually create them all, or import the backup settings. My monitor hosts change dynamically, so it'd be useful to be able to generate the settings .json ahead of time and load it at startup.

Alternatively, is there a way to trigger the "Import Backup" remotely, instead of using the GUI?

Thanks!

🐻 Uptime-Kuma Version

1.10.0

💻 Operating System and Arch

RHEL

🌐 Browser

Google Chrome

🐋 Docker Version

20

🟩 NodeJS Version

Using Docker

@troodes troodes added the help label Nov 4, 2021
@gaby
Copy link
Contributor

gaby commented Nov 5, 2021

👍🏻 for this feature, it would be very useful for stateless deployments.

@deefdragon
Copy link
Contributor

Likely a duplicate of #270

I really do think providing the option of loading in a config/backup on startup should at-least be re-considered. Based on the Project Styles, it sounds like Louis wants UK to be as easy as possible to use and deploy. I really don't think that adding the option to load a config/backup in via a file would mean any more difficult for users, while enabling some cool stuff like stateless deployments, or potentially making a custom startup script to generate the backup.

@louislam
Copy link
Owner

louislam commented Nov 5, 2021

Supports both ways (config file + config from web ui) are super difficult in my opinion, it would increase the complexity of Uptime Kuma and hard to maintain in the future.

Also it is against my project style:
https://github.com/louislam/uptime-kuma/blob/master/CONTRIBUTING.md#project-styles

So it won't happen.

Alternative, you can:

  1. After setup everything, you can build your container into own image by docker commit.
  2. Just use other open source projects which is config file friendly such as gatus: https://github.com/TwiN/gatus

@deefdragon
Copy link
Contributor

deefdragon commented Nov 5, 2021

I seriously believe you are shooting the project in the foot, but very well. I shall not bring it up again.

@troodes
Copy link
Author

troodes commented Nov 5, 2021

Yup, definitely a dup of #270 , thanks for pointing that out.
@louislam , thanks for the reply and suggested alternatives.

@troodes troodes closed this as completed Nov 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants