How to debug a Flask app which runs with gunicorn in a container?

Solution
from myapp.api import create_app


if __name__=="__main__":
    app = create_app()
    app.run('0.0.0.0', 8000, debug=False)
 api-debug:
        image: "myapp:latest"
        restart: on-failure:3
        environment:
        volumes:
          - ./:/usr/src/app
        depends_on:
          - rabbitmq
          - redis
          - mongo
        tty: true
        stdin_open: true
        command: tail -F anything
        ports:
          - 8000:8000