feat(docker): add gunicorn support & production default

Supply FASTAPI_BACKEND=gunicorn and FASTAPI_WORKERS=<threads_num> to
docker-compose up to use the gunicorn backend.

This is defaulted in production to gunicorn, but FASTAPI_WORKERS
should definitely be configured by any production deployment.

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2021-10-16 21:02:05 -07:00
parent 28c4e9697b
commit 927f5e8567
No known key found for this signature in database
GPG key ID: F7E46DED420788F3
5 changed files with 28 additions and 1 deletions

View file

@ -166,6 +166,7 @@ services:
environment:
- AUR_CONFIG=conf/config
- DB_HOST=mariadb
- FASTAPI_WORKERS=${FASTAPI_WORKERS}
entrypoint: /docker/fastapi-entrypoint.sh
command: /docker/scripts/run-fastapi.sh "${FASTAPI_BACKEND}"
healthcheck: