Last active
July 5, 2017 21:44
-
-
Save dtertman/35ba40dded70d837d8e4991d866b6b1a to your computer and use it in GitHub Desktop.
HTTPS working with grahamdumpleton/mod-wsgi-docker
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
FROM grahamdumpleton/mod-wsgi-docker:python-3.5 | |
# set up your /app directory with your WSGI application here | |
# The host location where the private key and certificate will be found | |
# You could also inject the keys | |
VOLUME ["/app/keys"] | |
# Expose the HTTPS port | |
EXPOSE 443 | |
# The "onbuild" variants include this, but the non-onbuild ones do not | |
ENTRYPOINT [ "mod_wsgi-docker-start" ] | |
# All of the below options are in mod-wsgi_express. To see them and many more, | |
# pip install mod_wsgi-httpd | |
# pip install mod_wsgi | |
# mod_wsgi-express start-server --help | |
CMD [\ | |
# The port that https should run on, should be EXPOSEd above | |
"--https-port","443",\ | |
# The location of the certificate file | |
"--ssl-certificate-file","/app/keys/cert.crt",\ | |
# The location of the server private key | |
"--ssl-certificate-key-file","/app/keys/key.key",\ | |
# The server name - this MUST match the URL in the browser / DNS name, or you'll get a 403 | |
"--server-name","my.dockerhost.com",\ | |
# The script to run | |
"app.wsgi"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment