-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Update docker-compose to use https #634
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
Comments
Why would you want to run https. I think a reverse proxy like ngix should be in front of the UI that will be using https |
I think would be good if you make the feature configurable. I want to run the ui inside a kubernetes cluster using http and outside the kubernetes cluster to be access via https |
This is exactly what I want to achieve - configure ngnix for https scenario, ideally with xip.io, without modification host table. 😉 Your scenario will be definetely supported. Thanks for feedback. |
Yes. I have done that. I currently use that setup for my local development. I have not use https for local development because I don't have such requirement but I suppose you can use a self-sign cert. I am using traefik as a reverse proxy. https://docs.traefik.io/https/tls/ I have not used a self-sign cert. Below is my docker-compose This way I don't have to be editing the host file. I currently use traefik.me which is similar to xip.io
|
Traefik will indeed solve the reverse proxy problem the same way nginx does. Just a different implementation. |
agreed. i have not tried using the self-signed cert. I am almost sure it will work and I will have https. My point is that the https should be the responsibility of nginx or traefik, not of the skoruba sts. suppose i want to use Azure Application Gateway infront of skoruba sts i stand to be correct. i am not a networking person |
True, in my solution the cert is part of nginx, not the sts. |
I think something along these lines could help and be a good start. Here's the explanation of each container:
This part is not directly related to https but it is related to nginx (some might've experienced it) as it might cause 502 bad gateway when authorizing a client. It is due the fact that nginx doesn't allow a large header content. To fix that nginx.conf needs to be modified and inlcude
|
@vpetkovic - thanks for your suggestion and sample configuration, I will definitely test it. 👍🏼 |
Unfortunatelly I got this error:
|
I am sorry I wasn't aware of such limitation when using xip.io with letsencrypt specifically, I used it with my own domain before to avoid dealing with self-signed certs and annoyances that come with it when trying to setup local environment for SSL as well as to have dev resemble prod env as close as possible. I have not tested below (maybe i can do that over the weekend) but If to use self-signed certs instead of letsencrypt it could be as easy as getting rid of letsencrypt container then run the following to create self-signed certs using openSSL :
Then modify default.conf in nginx container to point to self-signed certs created above.
Maybe additionally force http traffic to https:
Not sure yet if any additional SSL config inside of default.conf is necessary. |
That's why I used |
I increased the buffer in my setup as well. |
Sorry @skoruba , I haven't had a chance to look at this issue nor play around with self-signed certs as I originally imagined I would, but as you @bravecobra pointed out |
I'm glad you guys seem to have a path for this. My local setup (Windows 10) uses https://github.com/nginx-proxy/nginx-proxy and all of my microservices are behind it: 4 "public" web sites, 1 IdentityServer4, 1 Skoruba IdentityServer.Admin, 1 gateway, and about 10 private services. I wrote a .ps1 to do a lot of prep work to help with the setup. Things like download OpenSSL to generate a cert to save in the Windows Certificate Store and that same cert is used in the docker images, modify the etc/hosts file so I can setup https://acme.mydomain.local and https://identityserver.admin.mydomain.local, etc. I was also able to split the project out into 3 docker-compose files (working toward 4 or 5). There may have been easier ways of doing this... and it took a good couple weeks of me learning/implementing, but it seems to have made development easier for my team. |
@DaleyKD - can you share your setup please? Thanks |
@DaleyKD yeah, based on your description, I think my configuration is a bit easier, but with the same end result. |
Done - PR #657. Thanks for your help/suggestions. |
Uh oh!
There was an error while loading. Please reload this page.
It is necesarry to update in dev branch
docker-compose
forhttps
scenario.Good sample is provided from @bravecobra -
https://github.com/bravecobra/identityserver-ui
I would like to use http://127.0.0.1.xip.io - with https for development scenario as well - but currently it does not work properly on my machine - I need spend more time on this.
Currently this feature is blocker for next release, because I would like to provide support for docker as well and https is required.
Any help/PR is really welcome. 👍 🚀
Thanks
The text was updated successfully, but these errors were encountered: