Full Stack Rust Webapp + Docker Image Build

  Рет қаралды 53,476

Code to the Moon

Code to the Moon

Күн бұрын

Пікірлер: 74
@Mustafa-099
@Mustafa-099 Жыл бұрын
The smooth animation and the way everything is explained makes watching your content such a fun experience! Thank you so much for this awesomeness sir :)
@codetothemoon
@codetothemoon Жыл бұрын
thanks for the kind words, really happy you got something out of the video!
@viniciusataidedealbuquerqu2837
@viniciusataidedealbuquerqu2837 2 жыл бұрын
dude your organizational skills are outstanding, every reference on description with all explained in the video. I must say I need nothing more to use rust in my freelance right now
@codetothemoon
@codetothemoon 2 жыл бұрын
thank you for the kind words! are you clients generally open to using Rust?
@herbatnik9
@herbatnik9 2 жыл бұрын
You're missing .dockerignore file to ignore the locally built binaries 😉 it shall speed up the docker build a bit as it will minimize the docker context to be copied.
@codetothemoon
@codetothemoon 2 жыл бұрын
oh nice thanks for pointing this out Marek!
@thekwoka4707
@thekwoka4707 Жыл бұрын
And reduce layer cache invalidation. Though it can be faster to cross compile to the container target outside the container.
@Kodlak15
@Kodlak15 Жыл бұрын
Your videos are outstanding. Thank you so much for the time and effort you have invested into them.
@codetothemoon
@codetothemoon Жыл бұрын
Thanks Cody! Glad you're getting some value out of them 😎
@martinbecker1069
@martinbecker1069 Жыл бұрын
I realise this is an old-ish video but FYI, you can use multi-step builds to have a docker image that contains none of the build dependencies, this would reduce the size of the final image. That said this was an interesting video, very informative!
@dratir
@dratir Жыл бұрын
... that's exactly what he does in the video?
@martinbecker1069
@martinbecker1069 Жыл бұрын
@@dratir You're right, I'm used to seeing all 'From's finish with an 'AS something' which provides a build target. Because of that It didn't look to me like a multi-step build to me, re-watching clarified that.
@irlshrek
@irlshrek 2 жыл бұрын
so glad i found this channel! so much info!
@codetothemoon
@codetothemoon 2 жыл бұрын
So glad to have you onboard Eran!
@nikensss
@nikensss Жыл бұрын
I've been watching your videos recently, I really like them. Very nice, clear, concise explanations. Keep it up, man! :)
@zednotdead
@zednotdead 2 жыл бұрын
I don't know if this video covers it - but please release some kind of video targeting authentication, especially with OAuth and OIDC. That's been something that's been a pain in my backside for way too long, and your videos are really high quality.
@codetothemoon
@codetothemoon 2 жыл бұрын
It doesn’t - and I do plan to make one on auth. I began researching but kept running into snags - seems like this is definitely a pain point for the community.
@charlesbcraig
@charlesbcraig 2 жыл бұрын
@@codetothemoon would it be easier to use something like Auth0? I’m very new to it but it seems like it can plug into anything
@keatonhatch6213
@keatonhatch6213 Жыл бұрын
Just store the usernames and passwords in plaintext in your database. It’s pretty simple lol
@KartikeyaAgate
@KartikeyaAgate Жыл бұрын
Good video - it would be nice if you had one for debugging the backend awa frontend while they are in Docker i.e. the host is not used to compile but the dev container is, and from there push to prod after solving the bug(s)
@codetothemoon
@codetothemoon Жыл бұрын
thanks, and good idea, maybe I'll cover that!
@JensQNilsson
@JensQNilsson 2 жыл бұрын
It would be great with CI/CD follow up
@codetothemoon
@codetothemoon 2 жыл бұрын
nice yeah i'd love to do that, I'm actually currently looking into Railway, where apparently you can just point it to a GitHub repo with a Dockerfile and it takes care of the entire build and deployment for you (amazing). Then you can customize with Github Actions if needed. Will report back after I try it!
@ironhammer4095
@ironhammer4095 2 жыл бұрын
Very nicely done Sir!
@codetothemoon
@codetothemoon Жыл бұрын
Thanks Iron Hammer, glad you found it valuable!
@renatocunha6974
@renatocunha6974 Жыл бұрын
Friend, your content is fantastic. Thank tou 👍👍👊👊👊
@codetothemoon
@codetothemoon Жыл бұрын
thank you and thanks for watching!
@KNTH01
@KNTH01 Жыл бұрын
Thanks, very helpful!
@codetothemoon
@codetothemoon Жыл бұрын
Nice, very happy you found it valuable!
@danteDeveloper
@danteDeveloper Жыл бұрын
super incredible video
@codetothemoon
@codetothemoon Жыл бұрын
Thanks so much for the kind words!
@Asgallu
@Asgallu 2 жыл бұрын
Great video!. I really like it
@codetothemoon
@codetothemoon 2 жыл бұрын
Thanks for the kind words and thanks for watching!
@amirnoorani5017
@amirnoorani5017 11 ай бұрын
That was awesome! Could you show us how to deploy it to Github pages
@AceofSpades5757
@AceofSpades5757 2 жыл бұрын
Yew is a fantastic framework.
@codetothemoon
@codetothemoon 2 жыл бұрын
I agree!
@verified_tinker1818
@verified_tinker1818 Жыл бұрын
I like it a lot, too, but I have a hard time justifying its use in a world where Svelte exists. Svelte is both faster and easier to use. Still, I love Rust and am hopeful we’ll get something similarly simple in the future.
@Baron-digit
@Baron-digit 10 ай бұрын
Really helpful! Do you already have the deployment video? Maybe to additional questions: For changes to the app, what would be your process? (automation?) What would you recommend for a platform development?
@federicoferretti6245
@federicoferretti6245 2 жыл бұрын
soft would be the sun... Or maybe the earth? Fuck nvm. Point is I can't thank you enoughfor these tutorials. I've been playing guitar for
@codetothemoon
@codetothemoon 2 жыл бұрын
thanks for watching!
@Elduque40
@Elduque40 2 жыл бұрын
I'd like to see github actions actually
@codetothemoon
@codetothemoon 2 жыл бұрын
Nice, I'll put this on the roadmap!
@NexusGamingRadical
@NexusGamingRadical Жыл бұрын
Why do we need Docker when we can compile to a self-dependant binary?
@codetothemoon
@codetothemoon Жыл бұрын
I think one of the appealing aspects of Docker that is still relevant even when dependencies and portability aren't issues, as in the scenario you refer to - is "sandboxing" - ensuring that one application won't affect others that might be running on the same physical machine
@bogarren96
@bogarren96 Жыл бұрын
does rust have a future in backend development?
@codetothemoon
@codetothemoon Жыл бұрын
I'm fairly confident that it does, but we will see! 😎
@adela.k5463
@adela.k5463 2 жыл бұрын
maybe show us how to deploy it to AWS Fargate?
@codetothemoon
@codetothemoon 2 жыл бұрын
Yeah that's something I could definitely do, I've added it to the video idea list. Thanks!
@galaxygur
@galaxygur 2 жыл бұрын
Can you please create vscode devcontainer too? This is very cool, makes me excited about webdev again
@codetothemoon
@codetothemoon 2 жыл бұрын
thanks for putting these on my radar - i'll take a look!
@izuchukwuvictor2593
@izuchukwuvictor2593 2 жыл бұрын
Thank u so much. I've been so confused, but tNice tutorials video helped a lot.
@codetothemoon
@codetothemoon 2 жыл бұрын
🔥
@johnefan
@johnefan 2 жыл бұрын
Great content… Do we need an EC2 instance separately to run the docker on AWS?
@codetothemoon
@codetothemoon 2 жыл бұрын
I’d recommend trying ECS / ECR for deploying Docker images. EKS should work too but I’ve never used it.
@AfroHammerMedia
@AfroHammerMedia 2 жыл бұрын
How different would this be for a multi page application? Great video
@codetothemoon
@codetothemoon 2 жыл бұрын
Thanks! I think if you have separate pages served from separate files, instead of SPA you'd probably use actix_files and specify each file as a service (or maybe an entire directory). But it's important to note that SPA doesn't necessarily mean your entire app is "one page" or even that all of your source comes from one file. Modern frontend frameworks like Yew, React, Angular etc generally handle page navigation by making it appear to the browser that the user is staying on the same page for their entire session. But under the hood the "single page" is making AJAX requests to the server to replace the page contents with a different page.
@frydaydeep6674
@frydaydeep6674 2 жыл бұрын
there is nothing to install in `wasm-bindgen v0.2.81`, because it has no binaries `cargo install` is only for installing programs, and can't be used with libraries.
@codetothemoon
@codetothemoon 2 жыл бұрын
thanks yeah I think I made a mistake here, I think I was looking at the Yew getting started instructions which references `cargo install wasm-bindgen-cli`, thought I'm not even sure if that is necessary anymore.
@mathiasfantoni2458
@mathiasfantoni2458 2 жыл бұрын
When I create a new project, all I get is a "Hello, world!" function. Could you show how to set up the project so that I can also follow along all that code you have which I don't have?
@codetothemoon
@codetothemoon 2 жыл бұрын
Hi Mathias - there are two other videos that are sort of prerequisites to this one - "Build A Rust Frontend" and "Build A Rust Backend", both on my channel. Check those out and let me know if you have any questions!
@gamer-gw9iy
@gamer-gw9iy 2 жыл бұрын
How would you implement tests into this?
@codetothemoon
@codetothemoon 2 жыл бұрын
good question - i think each package would have unit tests, then there would be a separate package with Cypress tests for E2E
@meetthereqs
@meetthereqs Жыл бұрын
Did you make a separate video for the task manager?
@codetothemoon
@codetothemoon Жыл бұрын
I didn't, was planning on iterating on it from video to video but sort of left it hanging after this one. Is that something you'd be interested in seeing?
@meetthereqs
@meetthereqs Жыл бұрын
@@codetothemoon absolutely, thank you for the quality content !
@RVLexicon
@RVLexicon 8 ай бұрын
Github Actions
@chevbradford5850
@chevbradford5850 2 жыл бұрын
☹️ p̲r̲o̲m̲o̲s̲m̲
@codetothemoon
@codetothemoon 2 жыл бұрын
?
@avi7278
@avi7278 Жыл бұрын
No serious frontend application could be built with rust. Building a frontend app with Yew must be like going back a decade and a half or more in frontend technology to the early days of php. You must be a serious masochist to want to do that to yourself.
@hythamsoliman
@hythamsoliman Жыл бұрын
You are right to a certain extent as of now, yes the rust front end is still not mature as the js front ends, but to balance the entire pros and cons, there are benefits, i.e. WASM, and unified code for both the back end and front end. throughout a couple of years, I believe rust will be the master for both the front and back ends, especially with WASM shining. even in embedded, it is going great even with esp32 which needs C/C++, now you can develop with rust and the vendor is investing in rust. For me what I gain, is more than what I lose when I use rust for full-stack development.
@bcpeinhardt
@bcpeinhardt 2 жыл бұрын
Does anybody else keep getting "No such file or directory (os error 2)". Cant use sudo cargo run so I'm doing cargo build and sudo ./target/debug/backend
@bcpeinhardt
@bcpeinhardt 2 жыл бұрын
You need to run the executable from the backend directory to avoid the error turns out. Only for people who cant sudo cargo run.
@codetothemoon
@codetothemoon 2 жыл бұрын
nice glad you got it sorted out!
Rust Command Line Argument Parsing (A Better Way With Clap)
5:46
Code to the Moon
Рет қаралды 31 М.
Rust Demystified 🪄 Simplifying The Toughest Parts
14:05
Code to the Moon
Рет қаралды 182 М.
Girl, dig gently, or it will leak out soon.#funny #cute #comedy
00:17
Funny daughter's daily life
Рет қаралды 58 МЛН
Apple peeling hack @scottsreality
00:37
_vector_
Рет қаралды 128 МЛН
Самое неинтересное видео
00:32
Miracle
Рет қаралды 2,7 МЛН
Build A Full Stack Chatbot in Rust (feat. Leptos & Rustformers)
43:40
Code to the Moon
Рет қаралды 159 М.
Rust Powered Database SurrealDB (It's Pretty Ambitious)
11:28
Code to the Moon
Рет қаралды 109 М.
Deploy your Rust project in 20 minutes
20:29
Let's Get Rusty
Рет қаралды 48 М.
Coding a Web Server in 25 Lines - Computerphile
17:49
Computerphile
Рет қаралды 337 М.
The Best Way To Deploy In 2024 (feat. Docker, Rust, and Language Models)
18:33
Can We Make Yew Even Faster?
25:22
Greg Johnston
Рет қаралды 12 М.
The intro to Docker I wish I had when I started
18:27
typecraft
Рет қаралды 97 М.
Rust Powered Polymorphism ⚡️ With Traits
9:55
Code to the Moon
Рет қаралды 99 М.
Larger Scale Software Development (and a Big Trap)
17:17
Code to the Moon
Рет қаралды 91 М.
Rust & SQL Databases (With Diesel)
15:00
Code to the Moon
Рет қаралды 63 М.