Create default glance.yml file during first start as fallback
Description
It would be great if the glance application would come with a glance.yml initially or would create the default glance.yml automatically during first startup.
This would enable users to have an already running application during first startup and can manually adjust their glance.yml file later how they desire.
Which installation method would benefit from this? Using the provided docker compose template is the recommended and most straightforward way of installation, which already includes the config. The instructions for the other methods include grabbing a copy of the file, which makes its location and contents explicitly known beforehand. I have the feeling that creating it automatically is going to lead to situations where the user is unaware of its location, it gets created somewhere where they didn't want it to, or it won't get created at all due to permission issues.
curl -o actions-runner-linux-x64-2.323.0.tar.gz -L https://github.com/actions/runner/releases/download/v2.323.0/actions-runner-linux-x64-2.323.0.tar.gz
I used the windows executable and the console immediately closed itself on initial startup without the glance.yml file (I knew I needed one, but tried nevertheless). I thought that at least keeping the console open and showing a proper error message or just creating a "dummy" file could help here. I agree that one could run into permission issues, etc. but at least trying as much as possible might be just a little bit of a quality of life improvement.
If you might not agree here, feel free to close this feature-request.
@svilenmarkov maybe Glance could load an embedded default config (using the embed pkg), if no other configuration is found? That may alleviate FS permissions issues.
(sorry for the drive by, not an issue for me, but also thought about this first time I used Glance, as a nice UX touch)
@rubiojr, I would not do this. Either I would try to let glance fail more gracefully in case there is no config available or create the config on the fly. Imho having a default configuration would probably not make too much sense as it might be even more confusing.
I think we could probably add this feature strictly for Windows, since a good amount of people would try and run the binary like a normal application, which like you said opens the console and closes it immediately, not letting you see what the issue is.
Sounds good, thank you!
Question: What if instead of generating a file, a default was bundled with the windows release binary zip? The seems better and easier than implementing OS specific app code, but I don't know enough about the build process or if that complicates anything.
Agree, also viable solution. I do not really have a preference, just would like to improve the behaviour.
I have been bitten by this as well. I executed the glanceapp/glance docker image in Incus which allows to run OCI containers as well. The lack of a default config file in the docker image led to a pretty wired error, since glance exited right after the start.
Proxmox 9.1 now supports OCI images, and it would not start without a glance.yml file. Though there is a workaround (you'd lose backup capabilities), a basic config like:
pages:
- name: Welcome
columns:
- size: full
would help.