[For Discussion] Add environment variables to set SSL certs for Gunicorn #20
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.
This is to allow pygeoapi to serve over HTTPS.
The environment variables are:
--keyfile
--certfile
--ssl-version
--ca-certs
See https://docs.gunicorn.org/en/stable/settings.html#ssl for Gunicorn's SSL-related parameters.
Sample command:
where
url: https://localhost:5000
is set in theserver
section in my.config.ymlFixes #19
Despite discovering
GUNICORN_CMD_ARGS
which might negate the need for this pull request, I decided to go ahead and complete it because I was almost done, and wanted to refresh myself on the procedure of updating and testing pygeoapi Docker image, and maybe to start test building Docker image for pull requests too. (New issue to be filed later.)As to whether we actually want to merge this PR, that is up for discussion. Perhaps worth approaching upstream to see if they are interested in these explicit
PYGEOAPI_SSL_*
variables, and, probably more importantly, where to add a HOWTO for getting pygeoapi to serve HTTPS in the official documentation / FAQ.