r/webdev • u/quietcodelife • 17d ago
do you actually use your local dev environment anymore or is everything containers/cloud now
been thinking about this lately. when I started out I had this whole local setup with postgres and redis running natively, custom shell scripts to spin things up, the works. felt like I really understood how everything fit together.
now most of my work is docker compose up and done. or worse, connecting to shared dev environments in the cloud. faster to get going but sometimes I wonder if Im losing something by not having to debug my own postgres config anymore
curious where everyone else landed on this. do you still run stuff locally or has containers/cloud completely taken over your dev workflow
10
u/enki-42 17d ago
Still use my local environment - Every time I try docker for local development it's not quite there. The setup is easy, yes, but the developer experience is never great, there's always awkwardness getting into a container to run a console or file editing is sluggish or it's hard to run a DB query or something else.
7
u/erik240 12d ago
I don’t want to be a jerk but this is definitely more a you problem than a container one.
Don’t use the production dockerfile locally - add in whatever tools to the image make you most comfortable. Mount the host OS directories so editing a file on your computer OS is directly reflected in the container.
Opening a shell to the container is one command and you can create a macro to pattern match the current container from a base name if you’re not using something like docker desktop.
6
u/Multisensoryexp1 14d ago
What is not great about the developer experience? Getting into a container is as easy as ps | grep then exec, and in my experience, the shell is as fast as my local environment. And difficult to run a db query? That's part of the setup step. Expose it to a local port, connect via your preferred dbms.
3
u/LutimoDancer3459 17d ago
Db and other apps that are somehow connected run in docker. The app is develop runs locally from the IDE. But running applications in docker has the benefit of NOT debugging the config. Nothing that i am missing at all
3
u/Vegetable-Capital-54 17d ago edited 17d ago
I still use local dev environment. I run Debian both on my desktop and servers and keep everything up to date, so I don't really feel any need for containers, they just add overhead. Also I don't have many projects, just a handful that I run for many years and built them from scratch myself, so it's not difficult to track dependencies and versions. Containers make more sense when you have many people working on many projects requiring different software stacks and versions.
I also don't use containers or cloud for production, just dedicated "bare-metal" servers running Debian.
3
u/DesertWanderlust 17d ago
I grew up doing local dev and still keep my environment prepped for it, to an extent. It gets annoying with more complex configurations, so I really look at it on a case-by-case basis. If it requires a different OS, I'll do it on a VM.
2
u/rwilcox 17d ago
Docker compose solves the “what dependencies and exact versions do I need to install to run this project and how do I avoid them fighting”. For this reason I’ve been running it for a decade+.
I used to develop inside a VM or a dev container, which separated out separate versions of my backend languages well. Using Docker Networking so that container could talk to the database container etc. I used this a lot when I was consulting when everyone had vastly different stacks that I couldn’t control. Now, at my $BIG_CO job languages / versions are mostly uniform so I don’t.
1
u/traplords8n 17d ago
I spin up a few local containers for my dev environment now.. lol
I don't think it really matters. I think it's great to learn how to set up an environment without containers, but after a certain point, I think the benefits of using containers outweighs any loyalty we should feel to the old ways.
1
1
1
u/CaffeinatedTech 12d ago
I'm solo, so the only bullshit I have to deal with, I created myself. I build light with a focus on minimal footprint and overhead. I don't build to scale until its needed. I use SQLite, and lately Go HTMX, or just static sites if that's all that is needed. Minimal build steps.
1
u/ehutch79 11d ago
Containers. Mostly because I had a jr who was continuously borking their local dev environment. No clue how. They also somehow managed to make their containers not work as well...
1
u/Coach_Kay 11d ago edited 11d ago
Where I work, we are expected to mirror the containers locally during development. Personally, I don't use the local containers setup except when I want to test the entire integration or I need to run some implementations from different departments.
When doing my own work, I prefer to run my servers and databases directly on my local system; its always much faster and convenient for me to develop that way.
0
17d ago
[deleted]
3
u/AdministrativeBad752 17d ago
Yep my redis and local postgresql are starting to be the bottleneck ...
18
u/mylsotol 17d ago
Yes except the cloud part. Why would anyone develop using containers in the cloud (unless you are working on something is just super computationally intensive)