gunicorn with https
I am reading the documentation, and especially the section Gunicorn with self-signed certificate in order to facilitate non-localhost access. I cannot make it work by following the instructions, however. It seems like the statements in gunicorn_cfg.py have no effect, at least the output when launching marv (I am running it in Docker) is always
Listening at: http://0.0.0.0:8000 (not https)
The file is indeed parsed, because it complains if I add typos. But, as mentioned I cannot see that proper statements in the file have any effect. I also tried adding a bind = '127.0.0.1:8443'
with no luck. Still listening at port 8000.
The only way I could make https with self signed certificate work was to edit the .docker/entrypoint.sh, line 27 so that it also contains
serve --port 8443 --certfile "gunicorn-ssl.crt" --keyfile "gunicorn-ssl.key"
and build the Docker image using scripts/build-image
.
I don't know if misunderstood something or did not read the manual carefully enough, but I feel that the documentation could be more clear about this.
My gunicorn_cfg.py file contains only the two lines
certfile = 'gunicorn-ssl.crt'
keyfile = 'gunicorn-ssl.key
If that is not enough, please provide more detailed instructions. Eventually, an easier way to provide additional arguments to marv serve
could be introduced (or described more clearly if already possible) when running marv using Docker. I would look for those instructions in the Gunicorn with self-signed certificate section.