I have this flask app in a docker, with debug mode set to on:
app_1 | * Serving Flask app 'my_app' (lazy loading)
app_1 | * Environment: development
app_1 | * Debug mode: on
app_1 | * Running on all addresses.
app_1 | WARNING: This is a development server. Do not use it in a production deployment.
app_1 | * Running on http://172.22.0.2:5000/ (Press CTRL+C to quit)
app_1 | * Restarting with stat
app_1 | * Debugger is active!
app_1 | * Debugger PIN: 140-110-975
When I have a bug and I click the little console icon, I am queried the PIN, which I enter, and get: [console ready].
But then, when I type something in the console, I have:
Not Found
The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
to the URL: http://localhost:5000/submit?&__debugger__=yes&cmd=dump()&frm=140300814179632&s=ljASKJ6S2EwWtVcN8EHR
I thought it could be that the correct port is not open, as it can be for websockets (hot reloading in webpack), but here, it seems like the port is the same (5000) as the web app.
So any idea what could go wrong?
Thanks
I'm using:
Python 3.9.5
Flask 2.0.1
EDIT
Here is docker-compose.yml:
version: "3.3"
services:
app:
build: .
command: flask run --host=0.0.0.0 --debugger
volumes:
- .:/app
working_dir: /app
ports:
- 5000:5000
env_file:
- .env