Deploying a dockerized next.js app

Hey everyone! Has anyone deployed a Dockerized Next.js application to production before? I’m looking for some guidance on how to do the same with my application. Any tips or advice would be greatly appreciated!
4 Replies
PixelPioneer
PixelPioneer7mo ago
Yes I did ,but I wanted to have api dir. and app router in the prod
raphico
raphicoOP7mo ago
Where did you deploy the app?
PixelPioneer
PixelPioneer7mo ago
there you go ; the build and run commands (see down and i am storing it in the volume) are in the docker file -> https://github.com/MONISHSHARMA080/Magical-first-website-next-app
GitHub
GitHub - MONISHSHARMA080/Magical-first-website-next-app
Contribute to MONISHSHARMA080/Magical-first-website-next-app development by creating an account on GitHub.
raphico
raphicoOP7mo ago
Thanks! The approach I went for is using docker in development to mimic the production environment, ensuring consistency. But in production, I deployed the application to Vercel and used Vercel Postgres database. So basically, docker is utilized only in development. For the Dockerfile, I used the docker file provided by Theo in this documentation, https://create.t3.gg/en/deployment/docker, and used docker-compose to define and manage the application and database services. https://github.com/raphico/byte
GitHub
GitHub - Raphico/byte: A platform for developers to plan and manage...
A platform for developers to plan and manage virtual workshops - Raphico/byte
Want results from more Discord servers?
Add your server