I created a flask app that has an underlying peewee
database. It also interacts with openstack to create vms. This app is served by waitress via a DOCKERFILE
>> Docker file
ENTRYPOINT ["/usr/src/app/wrapper.sh"]
>> In wrapper.sh
# Start the primary process and put it in the background
poetry run waitress-serve --port=5000 --threads=8 --call "server:app.create_app" &
When I re-run docker compose I believe that docker sends a SIGTERM and waits 10 seconds before SIGKILL. Does waitress try to complete requests currently being processed? Or is there a way to tell it to? I can add some handlers within the app itself but if I can get the behavior without having to add code to the underlying app... Thant would be ideal.