docker / awesome-compose

Awesome Docker Compose samples
https://docs.docker.com/compose/
Creative Commons Zero v1.0 Universal
34.57k stars 6.64k forks source link

nginx-wsgi-flask: Correct build and run failures #339

Open OkkioXavier opened 1 year ago

OkkioXavier commented 1 year ago

When building the docker container build failed with:

ImportError: cannot import name 'escape' from 'jinja2'

Fix:

Upgrade flask and gunicorn to remove dependency on escape

When running docker run from the flask directory the container exited immediately.

Fix:

CMD ["python", "wsgi.py"]

to

CMD ["python", "app.py"]

Functional testing:

docker-compose image

docker run

image

rseningen commented 11 months ago

Upgrading requirements.txt fixes this issue

Flask==3.0.0 gunicorn==21.2.0