Good video, but I think you should have intruduced it from the standpoint of using OCI containers and that docker is just one runtime, not that it is the tooling of choice. Containerising your applications so they can be run under any OCI runtime (kubernetes, podman, etc) is where the real value lies, not vendor lock-in to one platform.
thanks for the feedback! I definitely made a point to emphasize that although I used AWS ECS as an example, once you have an image you're free to use pretty much any cloud platform. But to your point, instead of saying "any platform that supports Docker images" I probably should have said "any platform that supports OCI images".
I DIDNT KNOW YOU COULD DO docker init and the Dockerfile is made for you. I WAS BANGING MY HEAD TRYNG TO FIGURE OUT WHY MY DOCKERFILE WASNT WORKING. THANKS SO MUYCN
thanks, glad you got something out of it! i think it makes sense to make a habit of building for scale, even when you don't think you'll need it. because it actually doesn't cost any extra - just a few extra things to consider
You can use alpine images to both speed up your build, runtime and as well as patch any CVE that gets published. Combined with Rust, the resulting docker image size will be 20+MB which is 7x smaller than the Debian based image. Fwiw, Debian is pronounced Deb-Ian, not Dib-Ian. Ian Murdock created Debian in1993. The word "Debian" was formed as a portmanteau of the first name of his then-girlfriend (later ex-wife) Debra Lynn and his own first name.
thanks for pointing both of these things out! I stuck with Debian for the video mostly because that's what docker init gives you by default - probably not the best reason
01:20 "docker init" requires docker desktop. Whilst it is free for many people you need to look at the license and make sure that you are not requiring your company to subscribe to professional license fees.
Great video! I noticed that the entire src directory and the package.json file are being copied over before executing npm install. A possible improvement could be to first copy only the package.json file, run npm install, and then copy the rest of the source code. This way, the installation step would be cached, making the build process more efficient, especially when changes are made to the src directory but the dependencies remain the same. After that, something similar could be done with npx tailwindcss, but I have to say that I am not sure about that
Nice video. Clever approach of using a specialized build image just for the tailwind stuff. Haven't thought about it and will use that for sure! I'm currently learning rust and having a good time. Due to the interactive rustlings tutorial I get the same joy and flow as back in the days where I was learning scala with the official coursera course that had automated grading of the excercises
Yeah I should have left the clip at normal speed, at least for a few seconds 😎 you can sort of see the actual speed in the few seconds where I'm speaking as the text is coming through. Also I'm really stoked to see that you watched this, I really enjoy your content!!
As for recommendations for VM to run this on, I'd probably start with one of the g* instances like a g5. I think the inf instances may be even more ideal from a hardware perspective, but I'm not sure if there is software support for this type of stack on those
Woah hold on there moon boy! Now I may be super high, but I have enough on my plate coding and speedrunning ruby with my personal project and website. 😂 But I will watch your video because I love you❤ Take it easy, I just like the whale. I do not want to ride the whale yet. 😂 _I admit though deploying to docker is my preferred solution of choice_ (But after Ruby is Nim and Haxe, I know strange order but I rolled 20 languages in 3 ‘random’ lists. I picked 20 and thought they looked pretty and plucked them randomly and going with it.) Go was on the first list. But I have it fourth. And I am in ‘no’ rush until I hit week 4. I am scripting high after all 👌
Great video. I had just did the same thing recently on AWS with my Rust Docker. Would really liked to had know that 'Docker init' lol. As I struggled with my Mac M1 compiling to AMD64 and dealing with the AWS exec error I got haha. Its always a video after the fact. ;) But I have followed you for a while. Thanks for this new addition really helpful. Cheers.
thanks! Docker init is indeed pretty useful, I didn't know about it either until very recently. really happy to hear you're getting something out of the videos!
that's actually one of the boards MoErgo sent me to compare the different switches. I have to send it back but I'm waiting on the shipping info, so I decided to make it part of the set in the meantime 🙃
No, rust binaries bring everything they need (afaik). The don't need any runtime/vm. That's one of the big benefits of rust imo. Not an expert, since I only learned coding in rust last week.
Thanks for the feedback! I believe it can if you use 1 free tier ec2 instance. You could probably deploy multiple projects to it, thought I'm not sure what the best approach for that would be. Re: deployment guide, you mean more details on the building and deploying on a platform like ECS?
Appreciate the multi-stage builds, but your Dockerfile seems like a junk drawer to me. This is a "God" image that is completely unfocused and not easy to maintain. Consider breaking these up into separate Dockerfiles instead.
I hate these types of video. 99% of use cases do not need any scaling, and a single AWS instance will be able to handle everything. If your app somehow ends up actually needing scaling, you'll be making well enough money to do so at that time.
Even if you don't need scaling, containers are amazing for any kind of deployment. You build it once then you can run it on any OS, in dev or in production, and can be confident that it will work the same in all of them, and because they are so ubiquitous, a lot of cloud services will let you just use a docker image for a really easy deployment. Each line also adds a layer so you get incremental builds for free. If it doesn't change, it can just use the cached layer. Just make sure to put the slow things that rarely change at the top. Kubernetes is often overkill though, until you actually need the scale. Depending on how you host it, you can also scale down to 0 so that it doesn't cost anything when it isn't being used.
@@georgehelyar That's another issue with this approach specifically. Even when it's scaled down to zero, AWS ECS and ECR are not free. The load balancer he created has a fixed cost even if you have zero instances running.
@@thanatosjamie7663yea like I said it depends how you host it. My point was really just that containers are useful for any kind of deployment, not just for high scale, and that scaling can also mean scaling between 0 and 1, when you're talking about low scale. This can be cheaper than running a VM that sits idle most of the time, but again it depends how you host it, and there are a lot of options for that on both sides. The main reason to use containers is not cost or scaling, it's reproducable deployment. Cloud does the scaling (and this costs the money), containers make it portable and easy to deploy and know that it will work the same no matter how you host it.
Your deployment is not the ideal case for deploying rust apps. Aws instances are so expensive and docker also slows down rust applications. So your video isn't helpful for actual rust developers. A usually serious rust developer would want to create his own remote server and probably want to use nginx kinda server to run his server, because if you don't want to absolute best performance you don't write a web server with rust. So because of that reasons your video is abstract from reality. If you want to deploy that website to more realistic environment i would really appreciate it.
Thanks for the feedback! Where would you create this remote server and how would you scale horizontally? Also how would you use nginx to serve a Rust application? Always looking for solutions cheaper than AWS!
I am so proud of your channel. I have been following since you started and I can see the massive progress! :D
thank you so much! it's great to hear things like this, it motivates me so much 😎
Good video, but I think you should have intruduced it from the standpoint of using OCI containers and that docker is just one runtime, not that it is the tooling of choice. Containerising your applications so they can be run under any OCI runtime (kubernetes, podman, etc) is where the real value lies, not vendor lock-in to one platform.
thanks for the feedback! I definitely made a point to emphasize that although I used AWS ECS as an example, once you have an image you're free to use pretty much any cloud platform. But to your point, instead of saying "any platform that supports Docker images" I probably should have said "any platform that supports OCI images".
I DIDNT KNOW YOU COULD DO docker init and the Dockerfile is made for you. I WAS BANGING MY HEAD TRYNG TO FIGURE OUT WHY MY DOCKERFILE WASNT WORKING. THANKS SO MUYCN
Loved the video. I know we don't often need scaling but it is good to see how to get it working.
thanks, glad you got something out of it! i think it makes sense to make a habit of building for scale, even when you don't think you'll need it. because it actually doesn't cost any extra - just a few extra things to consider
You can use alpine images to both speed up your build, runtime and as well as patch any CVE that gets published. Combined with Rust, the resulting docker image size will be 20+MB which is 7x smaller than the Debian based image.
Fwiw, Debian is pronounced Deb-Ian, not Dib-Ian. Ian Murdock created Debian in1993. The word "Debian" was formed as a portmanteau of the first name of his then-girlfriend (later ex-wife) Debra Lynn and his own first name.
thanks for pointing both of these things out! I stuck with Debian for the video mostly because that's what docker init gives you by default - probably not the best reason
Docker stick to debian due to c lib compatibility issues, I think by default Alpine use musl which bite me in the past
01:20 "docker init" requires docker desktop. Whilst it is free for many people you need to look at the license and make sure that you are not requiring your company to subscribe to professional license fees.
ahh yes thanks for pointing this out, I should have mentioned it!
Great video! I noticed that the entire src directory and the package.json file are being copied over before executing npm install. A possible improvement could be to first copy only the package.json file, run npm install, and then copy the rest of the source code. This way, the installation step would be cached, making the build process more efficient, especially when changes are made to the src directory but the dependencies remain the same. After that, something similar could be done with npx tailwindcss, but I have to say that I am not sure about that
This should be pinned.
whoa thanks for pointing this out! sounds like a fantastic optimization - will give it a try!
Nice video. Clever approach of using a specialized build image just for the tailwind stuff. Haven't thought about it and will use that for sure!
I'm currently learning rust and having a good time. Due to the interactive rustlings tutorial I get the same joy and flow as back in the days where I was learning scala with the official coursera course that had automated grading of the excercises
15:55 You said it's not blazingly fast but that looks pretty damn fast to me! Any recommendations what VM type you would run this on?
Yeah I should have left the clip at normal speed, at least for a few seconds 😎 you can sort of see the actual speed in the few seconds where I'm speaking as the text is coming through. Also I'm really stoked to see that you watched this, I really enjoy your content!!
As for recommendations for VM to run this on, I'd probably start with one of the g* instances like a g5. I think the inf instances may be even more ideal from a hardware perspective, but I'm not sure if there is software support for this type of stack on those
Wait your split keyboard is totally wireless. It looks awesome, do you have a review of it?
yep, I do! it's actually the video immediately preceding this one: th-cam.com/video/PFFa3h7eLWM/w-d-xo.html
He made a recent video (9 days ago)
Great content, as always! Thank you.
thanks and thanks for watching!
Woah hold on there moon boy! Now I may be super high, but I have enough on my plate coding and speedrunning ruby with my personal project and website. 😂 But I will watch your video because I love you❤
Take it easy, I just like the whale. I do not want to ride the whale yet. 😂 _I admit though deploying to docker is my preferred solution of choice_
(But after Ruby is Nim and Haxe, I know strange order but I rolled 20 languages in 3 ‘random’ lists. I picked 20 and thought they looked pretty and plucked them randomly and going with it.)
Go was on the first list. But I have it fourth. And I am in ‘no’ rush until I hit week 4. I am scripting high after all 👌
this is one of my favorite comments of all time lol
Great video. I had just did the same thing recently on AWS with my Rust Docker. Would really liked to had know that 'Docker init' lol. As I struggled with my Mac M1 compiling to AMD64 and dealing with the AWS exec error I got haha. Its always a video after the fact. ;) But I have followed you for a while. Thanks for this new addition really helpful. Cheers.
thanks! Docker init is indeed pretty useful, I didn't know about it either until very recently. really happy to hear you're getting something out of the videos!
loved it! ty
thank you! 😎
great video .. thanks
thanks for watching!
Wait, wait, do you have a glove 80 gathering dust in a shelf??? Why?
that's actually one of the boards MoErgo sent me to compare the different switches. I have to send it back but I'm waiting on the shipping info, so I decided to make it part of the set in the meantime 🙃
@@codetothemoon , that was a speede response. After the initial shock I saw you were using a glove 80 during the video, so everything is fine 😄
Great video!
Pretty good content
thank you!
Does rust backend app need crate or anything else for deployment?(some thing like gunicorn for python)
No, rust binaries bring everything they need (afaik). The don't need any runtime/vm. That's one of the big benefits of rust imo.
Not an expert, since I only learned coding in rust last week.
It's not d-bian it's flipping DEB-IAN 😭😭
great vid btw
So I’ve learned :) you can’t imagine the comments about my pronunciation of “enum” 😆
love it.
thanks!
Great video as always . it seems u updated doom emacs and did not run nerd font install (thats why your modeline looks like crap) . Love u!
haha thanks for pointing this out, I didn't even notice! lol
Nice video
thank you!
Oi, you docker init?
Sorry what’s the question? 🙃
ecs does not scale to zero, right? Adds up for lots of side projects.. From the title of the video I expected a deployment guide, not docker..
Thanks for the feedback! I believe it can if you use 1 free tier ec2 instance. You could probably deploy multiple projects to it, thought I'm not sure what the best approach for that would be. Re: deployment guide, you mean more details on the building and deploying on a platform like ECS?
Appreciate the multi-stage builds, but your Dockerfile seems like a junk drawer to me. This is a "God" image that is completely unfocused and not easy to maintain. Consider breaking these up into separate Dockerfiles instead.
Seriously docker sucks. It's great that containerization was popularized, but docker sucks.
I hate these types of video. 99% of use cases do not need any scaling, and a single AWS instance will be able to handle everything. If your app somehow ends up actually needing scaling, you'll be making well enough money to do so at that time.
Never hurts to understand containerized scaling. But yeah I mean I deploy my projects in a single DigitalOcean Droplet lol.
thanks for the feedback! would the "money you'll be making" lend itself to an approach different than the one described in the video?
Even if you don't need scaling, containers are amazing for any kind of deployment.
You build it once then you can run it on any OS, in dev or in production, and can be confident that it will work the same in all of them, and because they are so ubiquitous, a lot of cloud services will let you just use a docker image for a really easy deployment.
Each line also adds a layer so you get incremental builds for free. If it doesn't change, it can just use the cached layer. Just make sure to put the slow things that rarely change at the top.
Kubernetes is often overkill though, until you actually need the scale.
Depending on how you host it, you can also scale down to 0 so that it doesn't cost anything when it isn't being used.
@@georgehelyar That's another issue with this approach specifically. Even when it's scaled down to zero, AWS ECS and ECR are not free.
The load balancer he created has a fixed cost even if you have zero instances running.
@@thanatosjamie7663yea like I said it depends how you host it.
My point was really just that containers are useful for any kind of deployment, not just for high scale, and that scaling can also mean scaling between 0 and 1, when you're talking about low scale.
This can be cheaper than running a VM that sits idle most of the time, but again it depends how you host it, and there are a lot of options for that on both sides.
The main reason to use containers is not cost or scaling, it's reproducable deployment. Cloud does the scaling (and this costs the money), containers make it portable and easy to deploy and know that it will work the same no matter how you host it.
Your deployment is not the ideal case for deploying rust apps. Aws instances are so expensive and docker also slows down rust applications. So your video isn't helpful for actual rust developers. A usually serious rust developer would want to create his own remote server and probably want to use nginx kinda server to run his server, because if you don't want to absolute best performance you don't write a web server with rust.
So because of that reasons your video is abstract from reality. If you want to deploy that website to more realistic environment i would really appreciate it.
Thanks for the feedback! Where would you create this remote server and how would you scale horizontally? Also how would you use nginx to serve a Rust application? Always looking for solutions cheaper than AWS!
Who tf says deebian?