mirror of
https://github.com/Googolplexed0/zotify.git
synced 2026-04-25 22:35:51 +03:00
[GH-ISSUE #17] Docker Oauth Flow #15
Labels
No labels
bug
considering
discussion
documentation
enhancement
enhancement
good first issue
help wanted
pull-request
question
stale
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/zotify#15
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tannerhallman on GitHub (Jun 6, 2025).
Original GitHub issue: https://github.com/Googolplexed0/zotify/issues/17
Running the stack with docker causes the 127.0.0.1 redirect URL to not work. I think
localhostwould work instead, but I don't see how to update that on the code in main.I see the redirect URI in this commit
github.com/Googolplexed0/zotify@bacdfce322 (diff-81323b78bf)but not when I pull it locally. Is that a dependency that we don't have access to edit? I'm not the most familiar with python. Thanks.
@Googolplexed0 commented on GitHub (Jun 7, 2025):
Added a config option with
b3ed323that should let you try differentREDIRECT_URIvalues and figure out what works for Docker. Please let me know your findings so I can add them to the README Docker advice section. If different URIs aren't fixing it, more logs and error messages would be necessary to find a fix.@IvanCarapovic commented on GitHub (Jun 11, 2025):
I found the issue that prevents Docker from working. Based off of https://stackoverflow.com/a/52518929 you should not use
127.0.0.1as the IP inside docker, because you "lock" the app to the containers internal loopback address. You should use0.0.0.0so it listens to all interfaces, including those that come from outside of the container as we need it to.Also, you need to add
EXPOSE 4381to the second last line in your Dockerfile so that the port 4381 can get mapped from host network to the internal network.Once I did those 2 changes, I managed to authenticate. Note that you also need to add
-p 4381:4381to your docker run command in README (or alternatively--network host) so that the internal/external ports are mapped.After login it seems the program crashes, but hey, we got 1 step further :)
@IvanCarapovic commented on GitHub (Jun 11, 2025):
Added PR with my changes https://github.com/Googolplexed0/zotify/pull/21
@Googolplexed0 commented on GitHub (Jun 11, 2025):
@IvanCarapovic thanks for the fix! Did you change the
REDIRECT_URIat all, to match the"0.0.0.0:4381"you changed the server to? If so, it might make sense to coordinate the__run_serveraddress with the config so that they always match.@IvanCarapovic commented on GitHub (Jun 12, 2025):
@Googolplexed0 As I see it, the REDIRECT_URI is not that problematic, the network access to the container was blocked before, no matter which redirect URI you choose, it would fail...
As for the IP, I think it should stay as-is, as the server you start has the IP of whatever it gets assigned, the IP is irrelevant, only the port. Thats why 0.0.0.0 is used as it basically means "listen everywhere". On the other side, when you actually make a request, you need to know where it is supposed to go, and in this case, you need a valid address, and in most cases, you run it locally, and therefore 127.0.0.1 is probably the place where you will find your server running most of the time.
@Googolplexed0 commented on GitHub (Jun 12, 2025):
Gotcha. After thinking about it for a few hours and running some tests, I came to roughly the same conclusion. Settled on making them both accessible (but keeping the defaults as they are now) with
2d97b8b. Excited to help troubleshoot our way through the rest of the Docker crashes. Might want to make a new issue since the OAuth is working, seems the issue is theinput()function now.