No video

Use Docker for Your Golang Projects with Live Reloading

  Рет қаралды 10,554

Melkey

Melkey

Ай бұрын

Docker + Golang are some of the best pieces of tech anyone can use. In this video I show you how to dockerize your golang project easily with live reloading in this tutorial!
Twitch
I stream live on Twitch every weekend
Twitch : / melkey
Join the amazing community on Discord
Discord: / discord
I post memes and host Twitter Tech Spaces
Twitter: / melkeydev
SUBSCRIBE OR GET LAID OFF
╔═╦╗╔╦╗╔═╦═╦╦╦╦╗╔═╗
║╚╣║║║╚╣╚╣╔╣╔╣║╚╣═╣
╠╗║╚╝║║╠╗║╚╣║║║║║═╣
╚═╩══╩═╩═╩═╩╝╚╩═╩═╝
Are you ready to revolutionize your Go development workflow? In this video, we'll show you how to set up Docker with Golang for seamless hot reloading. No more restarting your containers for every code change-watch your Go applications reload instantly!
🔍 What You'll Learn:
Setting up Docker for Go development
Configuring hot reloading for Go applications
Best practices for efficient Go development with Docker
👨‍💻 Who Is This For?
Go developers looking to enhance their productivity
Software engineers interested in Docker
Anyone wanting to streamline their development process
#coding #neovim #typescript ⁠Programming #vim #softwareengineering #codinglife #webdesign #webdevelopment #webdev #javascript #rustlang #rust #twitch #twitchstreamer #programmerhumor #codinghumor #software #softwareengineer #softwaredeveloper #softwaredevelopment #gymbro #gym #programmerhumor

Пікірлер: 63
@MelkeyDev
@MelkeyDev Ай бұрын
I hope you enjoy the video! Comment + like and subscribe if you did :)
@Gornius
@Gornius Ай бұрын
Instead of mounting a volume, you can now use docker compose watch feature in copy mode to make docker copy files into the container once they are changed.
@CristianJesus2002
@CristianJesus2002 Ай бұрын
What is the benefit of copying the files instead of just mounting the directory?
@Gornius
@Gornius Ай бұрын
@@CristianJesus2002 The most important for me is it eliminates problem of setting UID and GID of files. It makes files inside your developer environment run exactly the same as they would run on built image. The lesser gap between production and dev environment the better.
@MelkeyDev
@MelkeyDev Ай бұрын
Yep - im aware. But this focused on not introducing docker-compose, but instead just a Docker file
@prateekgogia8310
@prateekgogia8310 Ай бұрын
air is pretty amazing! The fact that you can get live reloading with the logs support makes app building in Go so much fun.
@MelkeyDev
@MelkeyDev Ай бұрын
Yeah it really is great
@sadhakbj
@sadhakbj Ай бұрын
I want to see more go content: microservices, observability and many more.
@MelkeyDev
@MelkeyDev Ай бұрын
okay! thank you
@elzabethtatcher9570
@elzabethtatcher9570 Ай бұрын
Actually useful video, thank you.
@Alex-bc3xe
@Alex-bc3xe Ай бұрын
You are the go specialist on my KZfaq :)
@MelkeyDev
@MelkeyDev Ай бұрын
yay - thank you
@potaetoupotautoe7939
@potaetoupotautoe7939 23 сағат бұрын
I' d love github repos of stuff you upload.
@kevinryan2992
@kevinryan2992 Ай бұрын
Air is okay for basic projects, but for things where you want to run different commands depending on which files change I much prefer cespare/reflex and watchexec/watchexec
@timbrockley
@timbrockley Ай бұрын
nice work :)
@MelkeyDev
@MelkeyDev Ай бұрын
Thank you
@krullie
@krullie Ай бұрын
It's not the only thing air can do but if you just want to live reload your project, and I mean any project, just use entr. I've never had to use anything else and it works with just about anything.
@ipasha3991
@ipasha3991 Ай бұрын
Great video. Wasnt aware that live reloading was also possible with golang. Is there a way to apply this concept with kubernetes? I have a configuration that requires a connection to a mongodb instance which is only accessible within the cluster. I could port-forward the database everytime i want to test something, but that would kinda defeat the purpose of convinience I think.
@MelkeyDev
@MelkeyDev Ай бұрын
I havent played around with live reloading with k8 in depth - but I would assume there must be something like that
@cempack
@cempack Ай бұрын
I have a question, what's the advantages of running the go project in a docker container instead of just running it locally?
@MelkeyDev
@MelkeyDev Ай бұрын
This is a great question, but its for containerising your environment
@fikurimax
@fikurimax Ай бұрын
I had a problem when using CGO. different glibc version between my local and the remote one. docker solved it
@dyto2287
@dyto2287 Ай бұрын
Biggest problem with dockerizing Go dev environment is debugging. It gets pretty nasty when you need to make it work.
@MelkeyDev
@MelkeyDev Ай бұрын
Yeah, it can for sure
@abdullahelwalid4494
@abdullahelwalid4494 Ай бұрын
Yeah i agree, you can check your logs in docker desktop and observe your container logs, it helps alot tho.
@dyto2287
@dyto2287 Ай бұрын
@@abdullahelwalid4494 I meant code debugging using breakpoints.
@fikurimax
@fikurimax Ай бұрын
Why not develop using air without docker and dockerize after everything is done?
@MelkeyDev
@MelkeyDev Ай бұрын
i dont think i ever said you cant do this
@fikurimax
@fikurimax Ай бұрын
@@MelkeyDev no I mean, why dockerizing it first. Just curious, what's the benefit
@OhDevBeard
@OhDevBeard Ай бұрын
I may be the only one but I just don’t understand what docker buys you. Like, what would be the point of dockerizing your project locally? Or on server? It just feels so overkill to me
@1316erick
@1316erick Ай бұрын
same, hope someone could explain why I should do this for local. thx!
@ascendo651
@ascendo651 Ай бұрын
The advantage is, that you build your app in the same environment as you deploy it later. Furthermore, if you work on an app with a colleague, both of you are using the same environment with zero setup.
@dyto2287
@dyto2287 Ай бұрын
Hmm... so you are one of those "works on my machine" kind of guys?
@codingwithjamal
@codingwithjamal Ай бұрын
docker allowed code to run anywhere no matter the OS that docker itself can run so it makes deploying to cloud simple. Its like bash scripts but with a vm and tools to manage your app in an isolated environment
@1316erick
@1316erick Ай бұрын
@@dyto2287 Of course, is there any other way to work? LMAO
@ArturdeSousaRocha
@ArturdeSousaRocha Ай бұрын
"HELP ON COBOL AND FEE..."? 🤔
@MelkeyDev
@MelkeyDev Ай бұрын
??? what
@ArturdeSousaRocha
@ArturdeSousaRocha Ай бұрын
@@MelkeyDev Bottom left in your VS Code. 😊 Was wondering what's going on.
@andherium
@andherium Ай бұрын
But why?
@MelkeyDev
@MelkeyDev Ай бұрын
yes
@andherium
@andherium Ай бұрын
@@MelkeyDev ah I see
@m7mo0o
@m7mo0o Ай бұрын
how to do this for NodeJs?
@j.r.r.tolkien8724
@j.r.r.tolkien8724 Ай бұрын
Every time I install docker it messes up my network.
@MelkeyDev
@MelkeyDev Ай бұрын
Are you on Windows?
@j.r.r.tolkien8724
@j.r.r.tolkien8724 Ай бұрын
@@MelkeyDev Debian. Haven't used windows in ages.
@93khizar
@93khizar Ай бұрын
no views in 1 minute, bros fallen off
@pythonwithsean
@pythonwithsean Ай бұрын
Shut up man the KZfaq algorithm is weird for tech KZfaq
@MelkeyDev
@MelkeyDev Ай бұрын
ouch
@nedmoore214
@nedmoore214 Ай бұрын
Docker > Golang
@maximofernandez196
@maximofernandez196 Ай бұрын
great reference
@MelkeyDev
@MelkeyDev Ай бұрын
Not this again!!
@ahmo4781
@ahmo4781 Ай бұрын
guys if you have problems with the hot reloading try to add poll = true in the .air.toml after that it worked for me.... (think its some windows bullshit)
@MelkeyDev
@MelkeyDev Ай бұрын
booooooo windows
This Is The BEST Way To Structure Your GO Projects
11:08
Melkey
Рет қаралды 69 М.
The BEST Tool to Structure Golang Projects
7:58
Melkey
Рет қаралды 24 М.
Sigma girl and soap bubbles by Secret Vlog
00:37
Secret Vlog
Рет қаралды 15 МЛН
Советы на всё лето 4 @postworkllc
00:23
История одного вокалиста
Рет қаралды 4,9 МЛН
НРАВИТСЯ ЭТОТ ФОРМАТ??
00:37
МЯТНАЯ ФАНТА
Рет қаралды 8 МЛН
Using docker in unusual ways
12:58
Dreams of Code
Рет қаралды 431 М.
If you're not developing with this, you're wasting your time
14:30
Articulated Robotics
Рет қаралды 276 М.
Read the Room: Measuring Air Quality with Rust and Elixir
17:50
Code & Stuff
Рет қаралды 1,2 М.
The World Depends on 60-Year-Old Code No One Knows Anymore
9:30
Coding with Dee
Рет қаралды 717 М.
THIS is the BEST Way to Write HTTP Services in Golang
13:53
Why I Use Golang In 2024
9:21
ThePrimeTime
Рет қаралды 282 М.
Golang: The Last Interface Explanation You'll Ever Need
17:58
Flo Woelki
Рет қаралды 6 М.
The BEST Tool to Deploy Your Apps (Stop using Vercel)
10:07
How I Structure New Projects In Golang
21:32
Anthony GG
Рет қаралды 55 М.
Every Framework Sucks Now
24:11
Theo - t3․gg
Рет қаралды 129 М.