Best Practices for Local Development of a Docker App

Hi everyone,

I am currently building an app from scratch, that i plan to run inside Docker containers. It will consist of one DB container and one backend container (Postgres and FastAPI, configured via compose).

I’m a bit stuck on local development of an app ultimately designed to run inside Docker. More specifically, I am not quite sure what the best practices are to develop such apps are, so here are some questions:

  1. Do I usually just run the FastAPI Server/Uvicorn and the Database on my localhost to develop locally and only use docker after I am done with my implementation to deploy my app?
  2. Given I want a different approach than in 1, is it common practice to just use Volumes defined in my compose file so the containers automatically retrieves changes made on my local machine? How do i deal with missing dependencies on the local machine (mainly for code completion)? Just use VSC Dev Container Extensions? What if i do not want to use VSC?

As far as I understand directly developing in Docker even locally pretty much eliminates “it worked on my machine” issues right? So what’s the way to go here? Would love to get some input!

Thanks a lot,
Lukinius