Skip to content
/ Docker Setup

Documentation

Docker Setup

Run your local database with Docker Compose.

PostgreSQL and MySQL projects include a docker-compose.yml that defines the database service, with a named volume so your data survives restarts. SQLite projects do not need it.

bash
docker compose up -d

Then run make migrate and start the API with make dev. The API itself runs on your machine, not in a container.

The Compose file only defines the database. The project also includes a Dockerfile for the API itself. See Deployment.

Hot reload

make dev uses Air, which rebuilds and restarts the server when files change. Install it with go install github.com/air-verse/air@latest. Without Air, make dev falls back to go run.