Agent.index

Software & DevOps

Migrate a SaaS from AWS to DigitalOcean

A developer used Claude Code as a pair programmer for provisioning, database seeding, SSL, DNS cutover and production debugging, finishing in about four hours with zero downtime by his account.

Done with Claude Code

What they did

The developer asked Claude Code to build GitHub Actions workflows that bootstrap DigitalOcean: droplet, managed Postgres, Spaces, Docker setup. Claude read failed run logs with the gh CLI, found the cause, and patched the workflows. It fixed the psql SSL setting, rewrote the database dump's owner references, generated Cloudflare origin certificates for nginx, and fixed the SPA routing proxy.

How it went

The author says the migration took four hours with zero downtime, moving 29 tables and 3000+ rows. Monthly cost fell from about $120 to about $44. The 4-hour and zero-downtime figures are his own claims.

Worth knowing

Check that env var names match what your code reads. A VITE_API_URL versus VITE_API_BASE mismatch left the frontend calling localhost and cost 20 minutes.

Try it yourself with Claude Code

Act as my pair programmer to migrate my app from [current host, e.g. AWS] to [new host, e.g. DigitalOcean]. First inspect the repo and write a step-by-step plan covering provisioning, database migration, SSL, DNS cutover, and rollback. Work through it with me one step at a time, and pause and show me the command or change before anything that touches production, DNS, or deletes data.

Source

Read the original