Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Change http port and offer non-automatic SSL option. #111

Merged
merged 3 commits into from
Aug 21, 2018

Conversation

MatthewDorner
Copy link
Contributor

  1. Some users have had issues with automatic SSL cert generation failing. We use certbot/letsencrypt in the "standalone" mode to get certs (https://www.digitalocean.com/community/tutorials/how-to-use-certbot-standalone-mode-to-retrieve-let-s-encrypt-ssl-certificates), which validates the cert by accessing your server on either port 443 or 80.

    The ability to use 443 was recently removed due to a security issue: https://community.letsencrypt.org/t/important-what-you-need-to-know-about-tls-sni-validation-issues/50811. Port 80 doesn't work for us either because we are currently exposing the nginx container's port 80 as port 8055 on the host, therefore cert cannot be generated.

  2. Also, some users don't have their server on a publicly accessible domain but would still like to use the docker install.

This PR changes the port for http from 8055 back to 80, which makes certbot/letsencrypt work again (tested on my VPS). The nginx config is already set up to redirect all traffic on 80 to https, except for traffic coming from localhost. I'd still like somebody else to review the nginx config and see if there's any security implication since it's now more likely http will be exposed, but it seemed OK to me.

This PR also provides an option via a switch in docker-compose.yml for providing your own SSL cert in a docker attached volume instead of using automatic cert generation. I also provided an option "none" for no SSL cert which only allows access from localhost but could be useful for evaluation / testing / etc, but I'm undecided on whether that's ultimately useful or should be left out.

@MatthewDorner
Copy link
Contributor Author

@mofesola might you have any comment on the proposed changes?

Copy link
Contributor

@mofesola mofesola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I think we may need to also add a config that caters to people who intend to run nginx from behind a loadbalancer

@MatthewDorner
Copy link
Contributor Author

hmm, any example of what that would look like?

Remove "none" from documentation for clarity but leave it as an option for convenience (testing, etc.)
@donaldwasserman
Copy link
Contributor

@MatthewDorner Let's just merge this in for now.

@mofesola To run a ELB in front of this, don't you just point your elb at the exposed port inside of the ecs? Or do you need to do fancy kubernetes stuff?

@donaldwasserman donaldwasserman merged commit 81d11f1 into HospitalRun:master Aug 21, 2018
@ghost
Copy link

ghost commented Oct 15, 2019

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@ghost ghost added the released label Oct 15, 2019
@ghost
Copy link

ghost commented Oct 15, 2019

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@ghost
Copy link

ghost commented Oct 20, 2019

🎉 This PR is included in version 1.1.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants