Closed ndrean closed 2 years ago
This can easily be managed by the phoenix
app using the package. 💭
What do you mean by this? I don't see how I can change the port 4000 -> 80 when you render "welcome" after Github login
redirect(conn, external: "http://localhost")
. Now I still need to open -p 4000:4000 ie bind the container to the host. I don't understand.
Once you get the Github credentials, you redirect to a welcome page. The URI contains a query string. Why is it so?
I explain my problem. In my containerized universe, Phoenix is reverse proxied by Caddy: I map 80 -> 4000. The problem is that once logged in, I am redirected to "localhost:4000&querystring" while I don't want this. I want localhost:80. The first reason is since I am redirected to port 4000, the Phoenix container must have the port 4000 open to the world, meaning map the container to the host with -p 4000:4000. If I could be redirected to :
this would work. I can even change my socket from localhost:4000 to localhost. The problem is I don't see what triggers this uri with this query string. I hope my problem is understandable.
My settings for Endpoint:
http:
key with port: 4000 because I can't set two containers listening on the same port (Caddy took 80).url:
key is described as: "configuration for generating URLs throughout the app. " so here I set port=80, Caddy's port.