feat(Docker): allow custom certificates for fastapi/nginx

Now, when a `./cache/production.{cert,key}.pem` pair is found, it is
used in place of any certificates generated by the `ca` service.
This allows users to customize the certificate that the FastAPI
ASGI server uses as well as the front-end nginx certificates.

Optional:

- ./cache/production.cert.pem
- ./cache/production.key.pem

Fallback:

- ./cache/localhost.cert.pem + ./cache/root.ca.pem (chain)
- ./cache/localhost.key.pem

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2021-10-02 13:26:05 -07:00
parent ad9997c48f
commit 3b1809e2ea
No known key found for this signature in database
GPG key ID: F7E46DED420788F3
3 changed files with 37 additions and 11 deletions

View file

@ -43,8 +43,8 @@ http {
listen 8443 ssl http2;
server_name localhost default_server;
ssl_certificate /etc/ssl/certs/localhost.cert.pem;
ssl_certificate_key /etc/ssl/private/localhost.key.pem;
ssl_certificate /etc/ssl/certs/web.cert.pem;
ssl_certificate_key /etc/ssl/private/web.key.pem;
root /aurweb/web/html;
index index.php;
@ -91,8 +91,8 @@ http {
listen 8444 ssl http2;
server_name localhost default_server;
ssl_certificate /etc/ssl/certs/localhost.cert.pem;
ssl_certificate_key /etc/ssl/private/localhost.key.pem;
ssl_certificate /etc/ssl/certs/web.cert.pem;
ssl_certificate_key /etc/ssl/private/web.key.pem;
root /aurweb/web/html;