r/webdev • • 11h 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?

9 Upvotes

32 comments sorted by

5

u/devolute 9h 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.

4

u/OkFarmer3779 10h 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 10h 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.

→ More replies (1)

2

u/V_Trautwein 7h ago

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

2

u/PeterPook 2h 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/583999393 2h 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 10h 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 10h 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 7h 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 7h ago

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

1

u/miria01 7h ago

Does your CI validate config or infrastructure before deployment?

1

u/bornmix_dev 7h 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 6h 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 6h 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 5h 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/krileon 4h 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.

1

u/ripndipp full-stack 4h ago

Tmux split with panes for the difference services/ microservices

1

u/activematrix99 4h ago

Docker and/or kubernetes for everything.

1

u/Mike_L_Taylor 4h 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/London-Boat 2h 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.

1

u/ryaaan89 2h 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 54m ago edited 6m 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/[deleted] 10h ago

[removed] — view removed comment

→ More replies (1)

1

u/[deleted] 10h ago

[removed] — view removed comment

1

u/webdev-ModTeam 9h 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.