The BEST Next.js setup: Next.js + Postgres + Docker (Dev / Prod)

  Рет қаралды 16,448

ByteGrad

ByteGrad

Күн бұрын

Get Docker Desktop here: dockr.ly/4dkjx8a (paid sponsorship).
Disclaimer: this is a sponsored video (paid). It's your responsibility to evaluate safety, accuracy and other relevant parts of the reviewed product.
NEW - React & Next.js Course: bytegrad.com/courses/professi...
Hi, I'm Wesley. I'm a brand ambassador for Kinde (paid sponsorship).
👉 Check out Kinde for auth and more bit.ly/3QOe1Bh
👉 NEW React & Next.js Course: bytegrad.com/courses/professi...
👉 Professional JavaScript Course: bytegrad.com/courses/professi...
👉 Professional CSS Course: bytegrad.com/courses/professi...
👉 Web development roadmap 2024 & 2025: email.bytegrad.com
👉 Email newsletter (BIG update soon): email.bytegrad.com
👉 Discord: all my courses have a private Discord where I actively participate
👉 Kinde: check out Kinde for auth and more bit.ly/3QOe1Bh
⏱️ Timestamps:
00:00 Intro
01:13 Quick example of Dockerizing Next.js for local development
01:31 docker init
03:04 Docker compose watch (hot reload!)
03:55 Docker Scout
04:54 Postgres development setup (with Docker)
06:39 Prisma setup
11:53 Docker debug
13:05 Production environment
13:29 Vercel setup
18:54 Database migrations
22:45 Docker + Next.js + Postgres final overview
#webdevelopment #reactjs #nextjs #docker

Пікірлер: 50
@ByteGrad
@ByteGrad Ай бұрын
I had a wonderful time working with Docker once again, get Docker Desktop here: dockr.ly/4dkjx8a (paid sponsorship). My latest course is out now (Professional React & Next.js): bytegrad.com/courses/professional-react-nextjs -- I'm very proud of this course, my best work!
@spectagodx3958
@spectagodx3958 28 күн бұрын
Great Video. I have deployed several NextJS container and it’s all fun and games until the container is behind a Proxy. For some reason NextJS 14 ignores env variables like HTTP_PROXY that node typically can handle. NextJS then is not able to send requests to services outside that proxy network like Auth providers. Do you know how set proxy variables to NextJS so the app can pass proxy’s?
@Alex.Shalda
@Alex.Shalda 28 күн бұрын
Awesome vid! Exactly what I need 🎉 thank you ❤
@404-not-found-service
@404-not-found-service 27 күн бұрын
Thank you for this material, your content helps me a lot
@ShahNawaz-oj5xt
@ShahNawaz-oj5xt 28 күн бұрын
Loved the tips on hot reload on Docker. Can you please make more videos on docker and kubernetes? Thanks!
@coders_rant
@coders_rant 28 күн бұрын
Thanks. Needed help with docker
@vinoopb
@vinoopb 28 күн бұрын
Hey, great video! May I know what theme you are using for VSCode please? Thanks!
@subhranshudas8862
@subhranshudas8862 28 күн бұрын
Thanks dude!
@jfhandfield
@jfhandfield 28 күн бұрын
Wow great video once more. Do you think you could do a video on dockerizing a next JS app in a TurboRepo. How to bundle all the dependencies and everything. That would be my next step in my company. Thank you for your time!
@amraromoro
@amraromoro 20 күн бұрын
What i like more about your videos your calm voice while explaining.
@not_a_human_being
@not_a_human_being 24 күн бұрын
great tutorial about going live with next/pg app in Vercel!
@BarisPalabiyik
@BarisPalabiyik 28 күн бұрын
We can pass the path value from window to the server action along with the formData to revalidate sender path dynamically right?
@PaulMerupu91
@PaulMerupu91 18 күн бұрын
Great content!
@prashantindurkar1457
@prashantindurkar1457 27 күн бұрын
Great Great Video Thanks
@sandzz
@sandzz 28 күн бұрын
Very well made tutorial. I am looking for a stack for my side project. So I can use vercel for the edge compute. but my postgresql will sit in 1 region only. So there is no point using edge compute for my nextjs app at all, because the responses will get delayed due to DB query anyway. Is there a good cheap way to handle db latency?
@sandzz
@sandzz 28 күн бұрын
or should I put all in a single VPS and call it a day?
@zacharyshifrel9107
@zacharyshifrel9107 28 күн бұрын
How do you guys feel about using the server side of Next.js (e.g., for fetching) while you already have an express backend? I do it, but it feels weird to talk about having two servers, lol.
@netTraverser
@netTraverser 28 күн бұрын
I don't know if this qualifies as being out of the scope of what you typically put out, but can you do a full on tutorial of docker? If it isn't too much to ask for
@ByteGrad
@ByteGrad 28 күн бұрын
Was thinking about it, may do it!
@netTraverser
@netTraverser 28 күн бұрын
@@ByteGrad appreciate it
@lostinthenarrativve
@lostinthenarrativve 20 күн бұрын
do I need to learn SQL before postgres or I can just jump in ?
@user-ru8hn9hb5c
@user-ru8hn9hb5c 28 күн бұрын
Do you think Drizzle is better than Prisma?
@academyonnet
@academyonnet 28 күн бұрын
Did I miss the timestamp where you explained why I would need a docker if I can develop on my local machine, push it to git and from there I can deploy it on Vercel?
@Dom-zy1qy
@Dom-zy1qy 27 күн бұрын
If you dockerize something, you can deploy it anywhere that you can host docker containers (which is pretty much everywhere). Also allows you to host it locally in an environment that much more closely mirrors the deployed environment
@cisdolce
@cisdolce 27 күн бұрын
i love this guy
@kritsrijakkot9175
@kritsrijakkot9175 28 күн бұрын
If I want to use docker compose to create containers for nextjs and postgre in the same time I build because I have problem about after build docker compose not connect to database. Can someone help me or show the example for me pls. Thank you
@doob50
@doob50 28 күн бұрын
thank you for the video! I was looking for a docker nextjs postgres video with prisma 😊
@ByteGrad
@ByteGrad 28 күн бұрын
Enjoy!
@ernestisaev6543
@ernestisaev6543 18 күн бұрын
what the color theme u use ?
@zerefdev
@zerefdev 28 күн бұрын
Please add "prisma" to the title:)
@pixbug3359
@pixbug3359 25 күн бұрын
Legend.
@haiffy
@haiffy 23 күн бұрын
Would be nice if you publish this as a starter in GitHub
@Devlou333
@Devlou333 28 күн бұрын
I'm a Front-end Developer. I learn SQL in High School. I want to learn Next.js. Should I learn Algorithm & Data Structures first or just GO for Next.js ?? Please Help
@azamataliqulov1601
@azamataliqulov1601 28 күн бұрын
If you never learn Algorithm & Data Stuctures, first learn them
@Devlou333
@Devlou333 28 күн бұрын
Thanks 🙏
@Alex-bc3xe
@Alex-bc3xe 28 күн бұрын
Even as a fronted developer you need at least data structures nested arrays of nested objects maps sets and so on this is like the foundation
@poznianski
@poznianski 28 күн бұрын
You don't need linked lists and and binary search for the 99 % of front end tasks. If you are already a frontend developer and want to learn the most modern framework - just do it and don't waste your time.
@breachr4696
@breachr4696 28 күн бұрын
Learn react before you do Nextjs, it's much more important. DSA is important but more so for a back-end developer than a front-end developer. Like the comment above me says, you just need to learn the fundamental data structures.
@andrejkling3886
@andrejkling3886 23 күн бұрын
Good video. Thank you. Using orm for real production it’s not good practice …
@maksymdudyk1718
@maksymdudyk1718 9 күн бұрын
I would be so nice of you, Wesley, if you could provide your true subscribers a link to github repo's codebase for this video.
@ustav_o
@ustav_o 27 күн бұрын
really nice video but lets please stop using prisma
@kaan1882
@kaan1882 20 күн бұрын
then what to use in your opinion
@looming_
@looming_ 19 күн бұрын
@@kaan1882Drizzle
@muhammadalifdanielbinmohdh3188
@muhammadalifdanielbinmohdh3188 18 күн бұрын
@@kaan1882drizzle
@edhahaz
@edhahaz 28 күн бұрын
Postgres (Prisma) so... not postgres
All 29 Next.js Mistakes Beginners Make
1:45:10
ByteGrad
Рет қаралды 55 М.
Они убрались очень быстро!
00:40
Аришнев
Рет қаралды 919 М.
The Most Important Skill You Never Learned
34:56
Web Dev Simplified
Рет қаралды 63 М.
The Truth about Rust/WebAssembly Performance
29:47
Greg Johnston
Рет қаралды 170 М.
From Idea To Robust Database Design
16:20
Ljupche Vasilev
Рет қаралды 3,5 М.
Why I'd never host my apps on a VPS
13:43
Web Dev Cody
Рет қаралды 28 М.
The BEST way to host Next.js websites
17:37
ByteGrad
Рет қаралды 21 М.
Why use Type and not Interface in TypeScript
14:12
ByteGrad
Рет қаралды 189 М.
Why I don't use React-Query and tRPC in Next.js
18:58
ByteGrad
Рет қаралды 70 М.
Dynamic Components in Vue
14:30
Alexander Lichter
Рет қаралды 4,6 М.