Add new features, fix .env setup, fix permissions and UID conflicts
I've addressed all complaints from https://github.com/Luctia/ezarr/pull/49 and some more.
Changes:
- Re-added support for Jackett, thus addressing: https://github.com/Luctia/ezarr/pull/10#issuecomment-1442821059
- Added FlareSolverr, thus solving https://github.com/Luctia/ezarr/issues/48#issue-2213261081
- Fixed audiobookshelf, thus solving https://github.com/Luctia/ezarr/issues/44#issue-2129818996
- Added automatic timezone detection feature to
main.py(it just reads from /etc/timezone), - The python script can now act as a compose file generator, as it asks the user if they actually want to set up folders and permissions.
- Resolved UID conflicts, while keeping the others the same as before
- Fixed manual setup by making new
.envanddocker-compose.ymlsamples. This also gives the end user the ability to customize container UIDs for manual installs. I also changed the provided compose file to a.sample, so it's more like the .env sample and the user will always have a copy of the original even if overwritten by the python script. - Since we're endorsing compose v2 I removed
versionfromdocker-compose.ymlso compose v2 doesn't complain about it. Also added a note to README. - Added a script to remove old users and an update script
- Updated README to reflect changes and added a note for NFS users to save them some trouble
I tried to keep my commit history as clean as possible so I hope reviewing this will be easy, although I did make quite a lot of changes. I did some testing and everything should work perfectly now.
It failed the docker-compose check because there is no longer a docker-compose file but just a sample. It wouldn't work anyway now since docker-compose.yml now depends on .env for manual installs. Checks should be rewritten or I can simply add a python-generated compose file which is hardcoded and should work in the current workflow.
It failed the docker-compose check because there is no longer a docker-compose file but just a sample. It wouldn't work anyway now since
docker-compose.ymlnow depends on.envfor manual installs. Checks should be rewritten or I can simply add a python-generated compose file which is hardcoded and should work in the current workflow.
You could add something like a "sample" ci-compose.yml and use it in the CI with the -f flag.
Just a small note: I actually used the remove_old_users.sh script to clean up the mess left by the original that failed. It worked for me.
@Pavlogal I really like your work apart from my comments, and would like to merge it. Could you let me know when you think you have time to work on the changes? If I don't hear anything before the end of the week, I think I'll merge it anyway and just immediately apply the changes myself.
Sorry for inactivity, I'm in the middle of college exam period and will have a little bit of time on the 21st/22nd of june. Let me know if that's okay for you
Absolutely! No need to apologize, I was just curious. That's absolutely fine, good luck on your exams!
@Pavlogal do you think you'll get around to it soon, or should I pick it up?
I'll start work on it later today
Sorry for the delays, college can be a bitch... I've addressed all the nitpicks. As for audiobookshelf, iirc I was looking into their docs and I couldn't find any mention of AUDIOBOOKSHELF_UID and AUDIOBOOKSHELF_GID like it was in your config. It really annoyed me how poorly documented this was. Their official examples actually always use either a user environment variable in the format UID:GID or a user section in docker compose with the same format:
https://github.com/advplyr/audiobookshelf/blob/master/docker-compose.yml
https://www.audiobookshelf.org/guides/docker-install/
I chose the first option and it seems to work.
I copied the folder structure directly from their docs so it has room for everything it needs, moreover audiobookshelf doesn't have the feature to look for, download and hardlink audiobooks. It's more like a book management service.
I did test the new user scripts back when I opened this PR and they worked really well. You just need to reboot sometimes for changes to fully take effect.
Big thanks to @Pavlogal for these changes! As far as I can see, there's no more issues and it solves quite a few inconsistencies.