issues
search
navapbc
/
template-application-flask
Apache License 2.0
7
stars
3
forks
source link
Run flask using production wsgi/http server
#185
Closed
daphnegold
closed
1 year ago
daphnegold
commented
1 year ago
Ticket
Resolves #174
Changes
Add and configure gunicorn
Local and prod agnostic entrypoint in
create_app()
, remove
app_config.environment
Remove
__main__.py
(this just adds another layer of complication that does nothing at this point except being an app factory wrapping an app factory)
Dockerfile starts gunicorn by default
docker-compose starts hot reloading Flask server, overriding gunicorn cmd in Dockerfile
Local via docker compose
Local with Gunicorn
Gunicorn running on AWS, 1 worker
Gunicorn running on AWS, 4 workers (available CPU x 2), 4 threads
Ticket
Resolves #174
Changes
create_app()
, removeapp_config.environment
__main__.py
(this just adds another layer of complication that does nothing at this point except being an app factory wrapping an app factory)Local via docker compose
Local with Gunicorn
Gunicorn running on AWS, 1 worker
Gunicorn running on AWS, 4 workers (available CPU x 2), 4 threads