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
Add/https #82
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ooooohhhhmaaahooosh! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the Pull Request (PR):
This will be the start to testing https for the containers! Specifically, I built a development "builder" locally, and I'll document how I did that here.
I first created a Dockerfile to generate the builder for my
add/https
branchI called this
Dockerfile.dev
so I built specifying the file:docker build -f Dockerfile.dev -t vanessa/expfactory-builder .
Once I had the builder, I could specify using the https template for my Dockerfile. What this comes down to is that the build will use an nginx configuration with https enabled.
We can see the generated files:
The primary difference is that we are copying the https nginx configuration instead of
nginx.gunicorn.conf
RUN cp script/nginx.https.conf /etc/nginx/sites-enabled/default && \ cp script/nginx.conf /etc/nginx/nginx.conf
Next Steps
I am attaching the files here (Dockerfile and startscript.sh) because next steps require setting up a server with certificates to run the application. I can almost assure you this is going to be tricky and take some debugging with reviewers, but fingers crossed we can get it working. I've put verbose instructions for setting up the certificates and server here --> https://github.com/expfactory/expfactory/blob/add/https/docs/pages/1-generate.md#https-container Note that I've already run the command to generate the Dockerfile, and I'm providing it here with the startscript. I haven't tested any of this (because it would require setting up a server) but I can offer to help walk through someone else following the steps. The Dockerfile and startscript.sh are provided in this gist (it won't let me upload it here).
Dockerfile and startscript.sh
There seem to be many ways to set up the nginx configuration, and what we will likely want to do (for the testers here!) is to get the https working on the host, and then build a container with the nginx.https.conf, and then iterate through:
/etc/nginx/sites-enabled/default
which is where the nginx certificate isInformation / debugging can be found in the container logs,
docker logs <container_id>
or by looking at the nginx logs in/var/log/nginx/
.This fixes or addresses the following GitHub issues:
Checkoff for all PRs:
Attn: @expfactory-admin