This document provides a comprehensive overview of all available Makefile commands for development, production, and utility operations.
| Development | Production | Utility |
|---|---|---|
dev - Start dev environment |
build - Build production image |
help - Show all commands |
dev-build - Build dev image |
start - Start containers |
generate-key - Generate encryption key |
dev-logs - Show dev logs |
stop - Stop containers |
setup-env - Setup environment file |
dev-stop - Stop dev containers |
restart - Restart containers |
test - Run tests |
dev-clean - Clean dev env |
down - Stop and remove containers |
lint - Run linter |
dev-data-clean - Clean dev data |
logs - Show container logs |
format - Format Go code |
dev-start - Alias for dev |
clean - Remove containers, networks, images |
status - Show container status |
dev-status - Show dev container status |
clean-data - Remove only volumes |
prod-start - Alias for start |
Starts the development environment with hot reload support using Docker Compose.
make devBuilds the development Docker image with all dependencies.
make dev-buildShows logs from the development containers in real-time.
make dev-logsStops the development containers without removing them.
make dev-stopStops and removes development containers, networks, and images.
make dev-cleanRemoves development data volumes (database, cache, etc.).
make dev-data-cleanShows the status of development containers.
make dev-statusBuilds the production Docker image optimized for deployment.
make buildStarts the production containers using docker-compose.yml.
make start
# or
make prod-startStops the production containers.
make stopRestarts the production containers.
make restartStops and removes production containers and networks.
make downShows logs from production containers.
make logsRemoves all containers, networks, and images.
make cleanRemoves only the data volumes.
make clean-dataShows all available commands with descriptions.
make helpGenerates a secure encryption key for PocketBase.
make generate-keyCopy the generated key to your .env file as PB_ENCRYPTION_KEY.
Creates a .env file from .env.example template.
make setup-envRuns the Go test suite.
make testRuns Go linting tools to check code quality.
make lintFormats Go code using gofmt.
make formatShows the status of all containers.
make status# First time setup
make setup-env
make generate-key
# Edit .env file with your configuration
# Start development
make dev# Build and deploy
make build
make start
# Monitor
make logs
make status# Clean development environment
make dev-clean
make dev-data-clean
# Clean production environment
make clean
make clean-data- Use
make dev-logsto monitor application output during development - Run
make testbefore committing changes - Use
make dev-cleanif you encounter Docker issues - Check
make statusto verify container health - Use
make helpto see all available commands