find Francesco: francescociulla.com 0:00 Intro, Architecture, Prerequisites, Project initialization 1:45 PostgreSQL 3:29 Backend: Python, Flask, SQLAlchemy, Dockerization of the Python application 14:30 Testing the backend service 15:57 Frontend: nextjs14, TailwindCSS, testing the frontend 27:35 Dockerization of the nextjs app and final test
Great content franc!! I wanted to know if we can deploy this docker container running backend server to the vercel ? Or do we need to deploy it to some other cloud?
@@francescociulla thanks franc! You are right. I've checked that it won't be suitable for my use case so I probably have to look into some other cloud.
I followed the steps you showed in the video and it actually worked. However, I have a big question: in ./frontend/src/components/UserInterface.tsx, it seems that in line 16, the frontend cannot call the backend through the env file but can only call when hard-fixing the path. Lead the backend here too. Is the reason coming from the frontend's Dockerfile? And what should I do if I want to use the .env file? Once again thank you for the useful video, hope you will reply me soon.
Hi, that env variable is set in the line 12 of the compose file. of course if you deploy the backend and frontend on different Ips, you should solve cors issues. if you want to use the .env file, you can do that and just use the env file in the docker compose (to be honest, docker compose automatically reads a .env file in the path, so it might look like magic)
@@francescociulla thanks for your reply. Oh i found that my env file is normal and docker-compose is normal too. The problem is not come from env file. When I try to log out from FE's container, I still see the backend's localhost:4000. But let's go back to line 16 of the ./frontend/src/components/UserInterface.tsx file, if you replace that line with "const apiUrl = process.env.NEXT_PUBLIC_API_URL" then the application is actually unusable. FE is not calling the correct BE localhost:4000 path that we passed in from the env file.
they are just warnings and these are used in the dockerization of the project. I can't remember now but if you delete those dependencies is not gonna work (you can try it out and let me know)
if i push it to a git repo, the postgres Database will be empty no? I want to share my code with a student and run postgres with node.js on a Docker container. Works fine for me localy since I already inserted some Data to the postgres database. But if he clones the repo and runs docker compose there would be no data I guess?
the repo contains a docker compose, where you have the definition of a service. no you will not get any data, but you'd start with a fresh new volume calleg pgdata on your host system
@@francescociulla so either i need to initialise a psql dump in docker compose.yaml or Upload my lokal docker Container to dockerhub, so he will get 1:1 my Database?
find Francesco: francescociulla.com
0:00 Intro, Architecture, Prerequisites, Project initialization
1:45 PostgreSQL
3:29 Backend: Python, Flask, SQLAlchemy, Dockerization of the Python application
14:30 Testing the backend service
15:57 Frontend: nextjs14, TailwindCSS, testing the frontend
27:35 Dockerization of the nextjs app and final test
Great content franc!!
I wanted to know if we can deploy this docker container running backend server to the vercel ? Or do we need to deploy it to some other cloud?
no you can't vercel is just to deploy next.js apps (it's their framework)
@@francescociulla thanks franc! You are right. I've checked that it won't be suitable for my use case so I probably have to look into some other cloud.
I followed the steps you showed in the video and it actually worked. However, I have a big question: in ./frontend/src/components/UserInterface.tsx, it seems that in line 16, the frontend cannot call the backend through the env file but can only call when hard-fixing the path. Lead the backend here too. Is the reason coming from the frontend's Dockerfile? And what should I do if I want to use the .env file? Once again thank you for the useful video, hope you will reply me soon.
Hi, that env variable is set in the line 12 of the compose file. of course if you deploy the backend and frontend on different Ips, you should solve cors issues. if you want to use the .env file, you can do that and just use the env file in the docker compose (to be honest, docker compose automatically reads a .env file in the path, so it might look like magic)
@@francescociulla thanks for your reply. Oh i found that my env file is normal and docker-compose is normal too. The problem is not come from env file. When I try to log out from FE's container, I still see the backend's localhost:4000. But let's go back to line 16 of the ./frontend/src/components/UserInterface.tsx file, if you replace that line with "const apiUrl = process.env.NEXT_PUBLIC_API_URL" then the application is actually unusable. FE is not calling the correct BE localhost:4000 path that we passed in from the env file.
Very cool demo, Thank you. @ 5:03 , how to get rid of those yellow squiggly lines?
they are just warnings and these are used in the dockerization of the project. I can't remember now but if you delete those dependencies is not gonna work (you can try it out and let me know)
Hey francesco we use exactly same tech stack in our company and I'm in backend but confused about flask is there a future in flask or django ?
I think there is for both of them.
Great explanation ❤
Thanks Abhishek!
Thanks for this masterpiece❤🎉
you are welcome!!
I wish I could add more likes. Thank you for the video 🤗
Your comment has been featured here twitter.com/FrancescoCiull4/status/1754193688480096632?t=kW64AklOTzthZ9LaLTU4-Q&s=19
Thank you for the video ❤
you are welcome
Hi @@francescociulla, just wanted to understand, why did you use NextJS not just react because you are not using any NextJS functionality.
Godd point. I also noticed it and I was going to ask the same thing.
if i push it to a git repo, the postgres Database will be empty no?
I want to share my code with a student and run postgres with node.js on a Docker container. Works fine for me localy since I already inserted some Data to the postgres database. But if he clones the repo and runs docker compose there would be no data I guess?
the repo contains a docker compose, where you have the definition of a service. no you will not get any data, but you'd start with a fresh new volume calleg pgdata on your host system
@@francescociulla so either i need to initialise a psql dump in docker compose.yaml or Upload my lokal docker Container to dockerhub, so he will get 1:1 my Database?
Thanks Brother.
You are welcome
Thanks any video on deployment of given app
I made some but we will do more in the future