r/webdev • • 21h ago

Discussion What does your local development setup look like?

I'm curious about how you guys have your development environments set up, both at work and for personal projects.

What does your local setup look like?

Do you debug inside containers? Do you run exactly the same setup as production, e.g. a local kind cluster? Do you connect to a remote server that hosts the codebase?

Similarly, how do you test DevOps-related changes? Do you use any specific tools? Do you run single-node clusters or multiple vms etc?

Do you mainly test deployed on a server or locally first?

13 Upvotes

35 comments sorted by

7

u/devolute 19h ago
  • Home: I use Valet on Mac with Nginx, PHP & MySQL provided via Brew services. Connect to a VPS via SSH to make things happen on live. Mainly.
  • Work: I work in higher education at the moment so we don't have such a thing as an environment. It's mainly just copy and pasting things from desktop into a CMS field and testing things in a hidden part of the website somewhere. Been a bit of a culture shock tbh.

5

u/OkFarmer3779 20h ago

windows with wsl2 for the backend stuff and vs code, docker compose for the db so i can nuke it whenever. keeping it identical to prod is nice in theory but my laptop would melt running a kind cluster lol

1

u/Desperate-Virus9180 20h ago

thanks for the reply, same here, nuking it whenever for us is a bit risky but yes that's probably the most usual set up.

I don't rly get why we have to have windows, I get security and security/co policy management.

So most of testing takes place locally, and you can probably even set up your services to listen to dev's dbs if needed for constistency, pretty traditional otherwise.

1

u/OkFarmer3779 18h ago

yeah wsl2 is basically my workaround for needing linux tooling on a windows machine. shared dev dbs for consistency makes sense, i just nuke mine because it's only me using it lol

5

u/V_Trautwein 17h ago

I usually develop locally with Docker, run tests in containers.

3

u/PeterPook 12h ago

Laragon to handle Apache on localhost:80, mysql:3306, Node, VSCode, Navicat Lite, Postman, Claude Code Desktop, chatGPT Go for image assets, Affinity for graphics tweaks. I work mainly on a Vite+React+Axios+PHP+MySQL stack.

2

u/krileon 14h ago

DDEV with Mutagen enabled and working on local files letting it sync to the VM. I was using Laragon, which I replaced with EnvKit, which I recently replaced with DDEV. Wouldn't go back at this point. Native was easier to setup and was faster, but Mutagen eliminated all my performance and usability concerns (mounting is slow and I don't want to edit directly in the VM...). Testing is done in the VM.

2

u/London-Boat 12h ago

once you run more than one agent or branch at a time, the thing that bites is shared state. two worktrees both want port 3000 and the same local db, and one agent's migration or db nuke breaks the other. what helps is a per-checkout .env with its own port and its own db name (a compose project name per worktree does most of it), so each copy is disposable on its own. and a cheap staging box you're allowed to break is a good call for the devops side.

2

u/583999393 12h ago

Digital ocean droplet with a dev domain pointed at it and Claude code installed and connected to services through a centralized brain app the holds details on each project. Claude spins up a new subdomain using the framework of choice, uses porkbun to make the subdomain and connect it up then creates the git repo.

It uses GitHub actions to deploy to the production site.

My fancy laptop to run docker is now pretty much redundant.

1

u/SwiinkaPeppa 20h ago

mac + docker compose just for postgres and redis, everything else runs native cause docker on mac eats all my ram lol. tbh i dont test devops stuff locally at all, i have a cheap staging vps and i break that instead

1

u/Naveen_prasath 20h ago

Use Minikube, as it is lightweight and can be used to provision a small, server-like environment for testing. You can mock the required services and use Docker Compose to run the database, cache, and queue services.

1

u/Adorable-Dust1084 17h ago

I mostly just run Docker Compose locally for databases and services while keeping the actual app running natively on my machine for fast hot-reloads,

1

u/Mammoth-Creme-7019 17h ago

I keep databases and queues in Docker locally so my machine doesn't get messy

1

u/miria01 17h ago

Does your CI validate config or infrastructure before deployment?

1

u/bornmix_dev 17h ago

docker compose for the stateful stuff (postgres, redis, queues), the app itself runs natively on the host because hot reload and the debugger are just faster that way. I don't try to copy prod locally, no k8s on the laptop, that's what staging is for. devops changes go to staging first, with terraform plan in CI before anything applies. side projects are the same idea, smaller, often just a local postgres and a .env. the thing that helped most was one command that brings everything up, so a new person is running in 10 minutes

1

u/hasibulmawla 16h ago

I've settled on keeping things boring and close to production after years of overcomplicating my setup. I run the app itself natively so debugging stays fast, while databases and queues live in containers I can tear down and rebuild without touching my machine. For anything infrastructure-related, I test it in a small staging environment first, because I've been bitten too many times by something that worked locally but behaved differently once deployed. That split has saved me a lot of time, and it keeps my laptop clean when I switch between projects.

1

u/Constant-Dig-Dog 16h ago

For Kubernetes stuff I only spin up kind when I'm actually changing manifests or Helm charts. Running a full local cluster for everyday coding was way too slow, so now it's a tool for specific jobs, not my default.

1

u/SibLiant 15h ago

3 mon setup with xubuntu for my daily dev driver. typical tech stack is backend: node, prisma, fastify frontend: react, mantine / tailwind shadcn/ui, tanstack.

I code review in neovim in the terminal. claude code cli plugs into my neovim session so I can review what claude is doing. While claude is doing what I instructed, I have the dev site up on another monitor where I can see it being built in real time. Hot reloads auto refresh everychange so I can just watch it build / debug ( this is completely mindblowing compaired to what I was doing just 5 years ago). I correct claude as needed based on my personal end to end testing. when I run into issues, I point that out to claude and where it does its own end-to-end tests and fixes as needed. As code is generated I get auto diffes in my editor to review.

when we're ready for production I build a local docker images and move them to my container repo. then production syncs those images.

Like most other have said, my dev containers are things like postgres / redis and tools.

1

u/ripndipp full-stack 14h ago

Tmux split with panes for the difference services/ microservices

1

u/activematrix99 14h ago

Docker and/or kubernetes for everything.

1

u/Mike_L_Taylor 14h ago

I'm on windows so mostly ForgeKit and some docker with WSL2.
on MacOS I was using Herd if I remember correctly
on Linux I hear Lerd is amazing.

1

u/ryaaan89 12h ago

For work they bought me a mini pc which lives across the house and I use VS Code remote to edit. Everything already runs in Docker there with its own Nginx router, I have network wide custom DNS in Opnsense rather than the hostfile edits most of my coworkers have on their laptops.

For personal projects its all my laptop but the environment is a real mixed bag, sometimes contsinerized sometimes not.

1

u/No-Ear843 10h ago edited 10h ago

On personal projects I develop on bare metal Linux. I do all dev and debugging locally. Dev and prod are the same setup. I've never had a problem keeping things synched effectively perfectly.

This is also how most of my jobs have been. Since the db's are often big and complicated, those are usually remote. I do sometimes hear about difficulties and glitches in cloud hosting during stand-up, but for the most part they have people who handle that. The solutions are usually just arbitrary, mundane config stuff.

The one job I had where we developed in containers added perpetual friction for the entire team. It was slow and harder to debug. Because it's harder to debug in a container, we had weird bugs that nobody could figure out, the entire time I worked there, which is nuts.

1

u/elendee 4h ago

glad to hear this perspective; as a solo dev, containers, just like React, is one of those things I would try once a year, hate it, and give it up til next year where I would give oneeee more try.

1

u/MapNo2659 6h ago

For my local setup, I usually run Docker containers to mirror the production environment as closely as possible. It helps catch issues early on that might only show up in production otherwise. For debugging, I find using VS Code's remote containers extension super handy. As for testing DevOps changes, I tend to use a single-node Kubernetes cluster locally before scaling up. How about you? Do you find any specific tools indispensable for your workflow?

1

u/elendee 4h ago edited 4h ago

I'm a solo dev control freak, so I just maintain linux computers that are close enough to my web servers architecture that any compatibility issue is more of a learning experience than a problem. No docker or containers. Linux, node, mysql and the web, what else could I need. If I get locked into some old package, that becomes a high priority for a refactor for me. I recently started an Opencode quarantine computer where I have sessions on cloned repos free from any env variables or gitignored stuff on the system. A bit freaked out the first time I realized Opencode was freely writing schemas into my password-protected local mysql. SSH is config'd for instant access to any server, I kind of prefer no tmux at the moment tbh, it actually seems like less mental overhead. But that opinion may change with more frequent usage.

All this workflow is the result of largely working alone; it is a two edged sword, but I do like that edge a lot.

1

u/[deleted] 20h ago

[removed] — view removed comment

1

u/webdev-ModTeam 19h ago

Your post/comment has been determined to be a low-effort post or comment. This includes title-only posts, easily searchable questions, vague/open-ended discussion prompts, LLM generated posts or comments, and posts/comments that do not provide enough context for meaningful replies or discussion.

1

u/[deleted] 19h ago

[removed] — view removed comment

1

u/webdev-ModTeam 19h ago

Your post/comment has been determined to be a low-effort post or comment. This includes title-only posts, easily searchable questions, vague/open-ended discussion prompts, LLM generated posts or comments, and posts/comments that do not provide enough context for meaningful replies or discussion.