Closed sahibbhai closed 1 year ago
I apologize I don't have a solution but can I ask how you were able to reference your settings.json inside the container? I'm also containerizing my flask app and using apk / pip3 to install python3-saml into the container but I can't figure out how to edit the config files. Did you just add the files directly into your app instead of using pip to install it? I think that may be the way I have to go.
@StranDutton Yeah, I cloned the Git repo into a directory, modified the config files, and then used docker build
to build an image based on the content of the directory.
@sahibbhai
the response was received at 127.0.0.1:85 instead of 127.0.01:5000
You get this because the python toolkit is not properly managing the internal port.
When you initialize the OneLogin_Saml2_Auth object, you are providing a request.
You will need to change the 'server_port' value of the provided request, and make sure it contains 85, or use directly server_host including the domain and expected port
@sahibbhai
the response was received at 127.0.0.1:85 instead of 127.0.01:5000
You get this because the python toolkit is not properly managing the internal port.
When you initialize the OneLogin_Saml2_Auth object, you are providing a request.
You will need to change the 'server_port' value of the provided request, and make sure it contains 85, or use directly server_host including the domain and expected port
hey @pitbulk, I just wanted to thank you and apologize for the delay in responding. I got my app working thanks to your hints. Changing server_port
in my app.py to 85 was the key.
Hey everyone. I have this toolkit working with a Flask app. I'm now trying to Dockerize my Flask app and running into some issues.
I'm getting all sorts of errors like
I'm thinking this has to do with ports, Gunicorn, and my
docker run
command. But I just can't seem to find the right mix that makes it work.Does anyone have any suggestions?
Here's my Gunicorn command:
CMD ["gunicorn", "-b", "0.0.0.0:85", "--workers=4", "--reload", "index:app"]
Here's my Docker run command:docker run -p 1337:85 myimage
My
settings.json
: