June 3, 2023, 9:24 a.m. | whchi

DEV Community dev.to

The key is running only 1 worker when start uvicorn





Content


For local Python app development, use a Docker container for non-application services like databases, Redis, etc. If all of your services are running in containers, you SHOULD use remote debug.


If all of your services are run in container you SHOULD use remote debug





0. Dockerfile


Here, I will use docker-compose as example



  • docker-compose.debug.yml



version: "3.8"
services:
pgsql:
image: postgres:13
restart: unless-stopped …

app application containers databases debug debugger development docker docker container etc fastapi pycharm python redis running services setup the key

AI Research Scientist

@ Vara | Berlin, Germany and Remote

Data Architect

@ University of Texas at Austin | Austin, TX

Data ETL Engineer

@ University of Texas at Austin | Austin, TX

Lead GNSS Data Scientist

@ Lurra Systems | Melbourne

Senior Machine Learning Engineer (MLOps)

@ Promaton | Remote, Europe

Business Data Analyst

@ Alstom | Johannesburg, GT, ZA