Hi everyone, how are you?
I have basic knowledge of Docker (I understand what it’s for and the general idea), but I’ve never used it professionally, and I’m running into some doubts.
I’m working on a project that includes:
• Backend: NestJS, Prisma, PostgreSQL, BetterAuth, etc.
• Frontend: ReactJS, NextJS, BetterAuth, etc.
The idea is to put everything in a monorepo, but keep backend and frontend separated.
About Docker:
• I created a Dockerfile and a Dockerfile.dev to manage separate environments.
• My initial idea was to have everything (Node, Prisma, PostgreSQL, etc.) inside the Docker image, with nothing installed locally, so I could develop and later migrate the same image to production without differences.
But I’m getting confused:
• When I install a new dependency locally, it’s not always reflected in the Docker image.
• Sometimes I end up doing things locally and other things inside Docker, which gets messy.
So my question is:
In a professional environment, what’s the most common approach?
• Do you develop everything inside Docker from day one?
• Or do you work locally and use Docker only for staging/production?
I know there’s no single right answer, but I’d love to hear your experiences and recommendations, especially considering the technologies I’m using.
Thanks in advance!