How to deploy a Go app in 60 seconds
One command, no Dockerfile, no YAML, no server. A real transcript of putting a Go app with Postgres and Redis on the internet.
Twenty minutes to write it, an afternoon to ship it
Here is a Go service. Forty lines, net/http, a Postgres pool, a Redis client, listening on
8080.
db, err := pgxpool.New(ctx, os.Getenv("DATABASE_URL"))
opt, err := redis.ParseURL(os.Getenv("REDIS_URL"))
log.Fatal(http.ListenAndServe(":8080", nil))
That part was fun. Now the other part.
You write a multi-stage Dockerfile and get CGO_ENABLED=0 wrong on the first attempt, as is
tradition. You write a compose file with healthchecks and depends_on conditions so your app
stops racing its own database. You rent a box. You point DNS at it. You install a reverse
proxy and read its documentation at an hour of the night that is nobody's best. You set up
certificate renewal and quietly hope you'll hear about it from a monitor rather than a
customer.
None of that is your app. It's rent you pay to main.go for existing.
One command
curl -sSL https://aiploy.dev/install.sh | sh
aiploy auth
aiploy init linkr
aiploy deploy
That last one prints this:
๐ Unlocking the gates with API key...
๐ Fetching your domain from the cloud...
๐ฆ Reading your magical tarball...
๐ Setting up your deployment lair...
๐๏ธ Building a secret temp hideout...
๐พ Stashing the tarball in temp storage...
๐๏ธ Unpacking the code treasure chest...
๐๏ธ Cleaning up the tarball mess...
๐ง Analyzing your code...
๐ณ Crafting a Dockerfile masterpiece...
๐๏ธ Building the Docker image
๐ผ Composing the orchestration symphony...
๐ Launching the containers
๐ค๏ธ Routing traffic like a pro navigator...
๐ Deployment successful! Your app is live and kicking! ๐
Twelve seconds. The app is on the internet, behind HTTPS, with a Postgres and a Redis attached and their connection strings already in its environment.
Here is the whole repo:
go.mod go.sum main.go
No Dockerfile. No compose file. No CI config. Not one line of YAML. I want to be clear that this isn't a tutorial that quietly skips a setup step โ there is no setup step, and there is nothing in that directory I haven't shown you.
The interesting bit
๐ง Analyzing your code is where the work happens. It reads your project and works out how
to run it: which package is the entrypoint, which port you listen on, which Go version you
build against, and โ the one people don't expect โ which databases you need.
Nobody told it about Postgres. Nobody told it about Redis. It read the code and drew the
obvious conclusion, then built a production Dockerfile, stood up both databases on a private
network, waited for them to pass their healthchecks, injected DATABASE_URL and REDIS_URL
so your os.Getenv calls find something real, and got a certificate.
Your app doesn't need to know any of that happened. That's rather the point.
Deploy again without changing anything and you get:
โก Code is identical! Skipping the build phase and reusing existing image.
It knows it already did this.
What it won't do
I'd rather you hear this from me than from the pricing page.
Go only. That's the whole trick. A Node or Python service gets you a shrug today.
No team features. One account, its apps, and you. No orgs, no seats, no permissions matrix to administer on a Sunday.
It isn't free. Seven days free with a card, then $2/mo. I'd rather charge you the price of half a coffee than run something free that I have to switch off in a year.
And $2 buys a small thing: one app, 32 MB of memory, a tenth of a CPU, one database, two days of backups. It will run your side project happily and your startup not at all. Custom domains start on the $20 tier.
What you didn't do
No Dockerfile. No compose file. No server. No reverse proxy. No certificate renewal. No CI pipeline. No YAML. No afternoon.
You wrote main.go, ran one command, and everything that was already implied by your code
got taken care of instead of retyped.
7 days free with a card, then $2/mo.