You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am experiencing an issue where the configuration json file is always being written even if it already exists on disk.
After a quick look, I assume that the issue is from the lines below:
// Connection details are saved into the configuration file
conf.ServerURL=app.Server
conf.APIKey=app.Key
conf.APIURL=app.API
err=conf.Write(app.ConfigurationFile)
It reads the configuration and later writes the configuration irrespective of whether the data was complete.
If I understand correctly, the JSON file doesn't need to be updated over time.
The reason is that my secrets are stored on a read-only file system (for further reference, see LoadCredential from systemd) and that currently triggers the errors.
I believe it would be sufficient to check if the config was read and only write if no config file was read or if a new CLI argument was used. I have a draft PR/commit available if it helps:
Ah, sorry. I never got a notification for the 馃憤 emoji...
I have been running my own patch for some time, and I've seen #211 has been merged in the mean time.
Would you accept a PR that would split up the configuration file into individual files?
My motivation is again linked to secrets being stored in a non-writeable location (the API token).
But the host URL for example, is something I would like to inspect/change/update and not "hard-code" into the secret/configuration file.
But I can also understand if this is not something you are interested in. Just let me know 馃憤
Hey, thanks for the project! 馃檹
I am experiencing an issue where the configuration
json
file is always being written even if it already exists on disk.After a quick look, I assume that the issue is from the lines below:
immich-go/cmd/shared.go
Lines 107 to 131 in 9c62473
It reads the configuration and later writes the configuration irrespective of whether the data was complete.
If I understand correctly, the JSON file doesn't need to be updated over time.
The reason is that my secrets are stored on a read-only file system (for further reference, see LoadCredential from systemd) and that currently triggers the errors.
I believe it would be sufficient to check if the config was read and only write if no config file was read or if a new CLI argument was used. I have a draft PR/commit available if it helps:
3b560c1
Also happy to refactor if necessary :)
The text was updated successfully, but these errors were encountered: