-
Notifications
You must be signed in to change notification settings - Fork 12
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
Split api and config logic #5
base: master
Are you sure you want to change the base?
Conversation
Hi Ryno! Thanks a lot, I love the refactor! I think in the long run, I’d like to keep using the initialize.js. I have no idea why they make it so easy to retrieve the API key but I don’t find it hacky, it makes it more seamless to the user and reduces the chance that API key ends up in a committed config file. Now, I agree with you that it gets hacky when the API keys are provided in clear in the Prowlarr config. In a future update, I’d like to make Flemmarr fetch the URLs and API keys for applications automatically. |
In the Dockerfile, I split the ADD for caching purpose. When adding requirements.txt alone at the beginning, it doesn’t need to fetch these requirements every time it builds the image. But it might slightly increase the size of the image to have this one additional step. I’ll check and merge if that’s the case. |
Fair point about the api key, parsing the javascript seems a bit fragile (but probably won't change), but I think its nice if the api key could be specified as a backup. So I added both :). I think having to specify api keys for prowlarr in plaintext is maybe a showstopper though, so I added some support for environment variables. Also split the dockerfile again based on your comment, but moved the requirements.txt to root where I think it belongs. |
Hi @RynoM, I'd love to merge this PR now that I'm back from holiday. I'll try to review it and merge it later this week. |
@PierreMesure let me know if you need anything |
Hi @RynoM! Sorry, I got back from holidays and got sucked in daily work (and some other new projects). I won't have time to look at it this weekend but maybe next one. How are you progressing with exporting an existing config? |
Hey @PierreMesure , this time I was the one on holiday. Back now and might continue on it this weekend. When I left it, it was pretty close to a working PoC for 1-2 of the services. How do you want to go about this PR in relation to the new feature of exporting current configs? |
@PierreMesure Exporting current configs seems pretty stable (I think) in this other branch: https://github.com/RynoM/Flemmarr/tree/feature/get-current-config |
@RynoM Tried out you repo and to get a sample dump from brand new local *arr instances. I removed the config.yml to try to force a backup dump. I am struggling with specifying my API keys in this setup. I am getting the following error
|
Hi @gottsman, There is currently no difference between error and info logs, so I get the confusion. The logs you are seeing are from expected behavior. You should be getting a new file called The code will try to make a backup first, no matter if a With regards to the api key; I removed the ability to specify one in this branch, since it can be done automagically. However it would be quite easy to allow the explicit specification again if needed/wanted. Let me know how it goes! :) |
The patches from @RynoM work brilliantly and as expected. I built and tested against linux/arm64 and linux/amd64. My previous issues were related to docker networking in my personal setup. |
Awesome! :) Did you happen to try backup and re-apply or just backing up? Curious if the whole flow works well. |
I've not been able to successfully push the config. Probably user error :-) I still am unsure how to specify the API key (either in the compose file or the resulting backup config yml). I also am getting a warning on my M1 Mac. It doesn't provide the same warning on a linux VM (AMD64). I don't that variable defined in my compose file. Perhaps its a docker system variable.
|
@gottsman You don't have to specify an API key for Flemmarr to be able to connect to your services, it will call the 'initialize' endpoint on each service and retrieve the key from there. The log you posted doesn't look related I think. Do you have any logs from the Flemmarr container specifically? If something went wrong there should be errors / a stack trace in there. |
I ran Flemmarr on a test VM with the backup config exported from the family media server. Although I provided the config.yml, it still attempted to create the backup config. The new backup config was roughly smaller than the "real" config. Logs below....
|
@gottsman The way I have it setup now, it creates a backup every time, regardless of if you provide a config. Thanks for the logs though, it helped me identify an issue I hadn't spotted yet. Unfortunately I don't have much time at the moment, but I will try to work on a solution. |
Hi,
Really like the idea for this project and totally see a use for this myself. I've been playing with it a bit for fun and made some changes that might be nice. Hope this is useful. Thoughts/changes:
I dont have a good setup yet to test many settings for multiple of the *arr applications though, but functionality shouldn't have been changed.