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
HTTPS doesn't seem to be working...? #406
Comments
I think it’s normal for the app inside Docker to be on plain http. The important part is the proxy configuration. What are you using? Could you share those configs as well? |
Okay, I guess I thought the gunicorn thing was a proxy of some sort. I would use nginx if I needed to set that up, but my question would be about the https traffic for the app in that case. Since it would need to be on a separate port, is there some configuration required to get the app to listen in on that port so that I can then forward traffic to it? When running
Or does this app listen to the same port for both traffic and just interpret whether it's HTTP vs. HTTPS based on that header that's passed in? If so, then I could see how I would setup nginx to redirect to the https with setting that header to true. I'm not sure if that's where you were going with that. If so, I can give it a try and report back with whether or not I got it working. 🤔 |
Oh wait yeah maybe this should work without something like NGINX in between… I think I just did that yesterday hah. Will try to find some time soon to test this. I also recommend dropping in the Baby Buddy gitter for advice. Lots of Docker users there. |
Ok so backtracking again... I'm pretty sure this is expected (: Gunicorn is only going to serve up the app over an unencrypted connection so you'll need a proxy like NGINX in front of it to handle SSL and redirect the traffic appropriately. I'm going to see if I can cook up some quick documentation on this. |
Ah hah okay, that makes sense. I haven't had the chance to tackle this much further today, so documentation would be awesome! Thank you so much for quickly looking into this :D When I get some time to do this on my end too, I'd be more than happy to report how I set it up too if you haven't done the documentation by then (just in case it helps). |
Well you made me curious and caught me at a good time with the little ones napping so I think I got this all documented! https://docs.baby-buddy.net/setup/ssl/ Give it a go and let me know if you have any trouble/suggestions/additions/etc. There are lots of other ways to do this but this a pattern I am most familiar with. It can also be done all within the |
Hey @cdubz thanks a ton again for this. I did modify my docker-compose to work with this and I now have HTTPS! For others who may need this, or if you want to add this to future docs, my docker-compose looks like the following:
I decided to listen in on 18000 (to avoid conflicts w/ another port 8000 service I have)
Lastly, here's my
I hope this helps someone else who wants to run nginx behind docker-compose instead of a full blown service, and thanks again cdubz for the quick responses :) |
Cool! This helps me understand better some of the Docker config examples I saw. I should be able to add to the documentation for this method as well. |
Okay, this is probably just me personally and not a bug, but I just can't get HTTPS to work. My app keeps going straight to HTTP instead even though I've set the few environment variables mentioned on some issues and the docs... Is there something obvious that I'm missing?
Here are the 3 environment variables I set in the
.env
file:And my docker-compose:
I've tried to also have these environment variables under
environment:
in the docker-compose but that didn't make any difference. Am I missing something obvious? Last few logs indocker logs babybuddy
:^ As can be seen here, it's doing http instead of https.
Any guidance or clarification would be appreciated. I'm working on trying to make this externally accessible for us and don't want to do so until I know I can make sure it's setup over https :)
Oh and in case it's needed, the version in the dropdown on the UI shows
v1.10.1
👍Thank you!
The text was updated successfully, but these errors were encountered: