Makefile Reference

The Makefile is a slim wrapper around a collection of shell scripts and docker compose calls, giving you short, memorable commands for every stage of your local and remote workflow.


Preamble & Variables

NameMeaning
CURRENT_UID / CURRENT_GIDHost user and group IDs (forced to 1000 on macOS). Injected into containers so generated files retain correct ownership.
PARAMSEverything you type after the target — make <target> [params...] — forwarded to the called script.
PARAM1…PARAM3Shortcuts for the first three extra words — make <target> [param1] [param2] [param3].
DEFAULT_USERDocker user name read from .env.main, in result have CURRENT_UID and CURRENT_GID, so same IDs as Host user

Targets

Make TargetCommandDescription
make install [environment_type]sh/system/install.shOne‑shot install
make imake installAlias
make secretsh/env/secret-gen.shCreate .env.secret
make env [environment_type]sh/env/init.sh $(PARAMS)Re‑build root .env from parts
make certbotsh/system/certbot.sh $(PARAMS)Obtain or renew SSL certificates
make sslmake certbotAlias
make core-installsh/wp-cli/core-install.shIdempotent WordPress core install
make watchsh/dev/npm-watch.sh $(PARAMS)Front‑end watch with BrowserSync
make up [environment_type]docker compose up -dStart (or rebuild) containers, detached
make upd [environment_type]docker compose upSame, foreground
make downdocker compose down -vStop containers and drop named volumes
make restart [environment_type]docker compose restartQuick service restart
make recreate [environment_type]docker compose up --force-recreateRebuild & replace every container
make import \sh/database/import.sh -f $(PARAM1)Import SQL dump and fix URLs
make exportsh/database/export.shDump current DB to tmp/
make replace [search] [replace]sh/wp-cli/search-replace.sh $(PARAMS)Database search/replace
make migrate \ \sh/system/migrate.sh -s $(PARAM1) -d $(PARAM2)Push/pull DB between environments
make pmadocker compose run phpmyadminThrow‑away phpMyAdmin session
make mailhogdocker compose run mailhogMailHog UI for local SMTP
make log [service]docker compose logs -f $(PARAMS)Tail service logs
make run \sh/dev/run.sh run $(PARAMS)Starts a one-off container with shell
make exec \sh/dev/run.sh exec $(PARAMS)Opens a shell in running container
make lintcomposer lint && npm run lintPHP & JS linters inside containers
make terraform \terraform -chdir=iac/terraform $(PARAMS)Run Terraform configuration
make ansible \ansible-playbook iac/ansible/playbook.yml $(PARAMS)Provision or deploy with Ansible
make docker build|push [service]sh/system/docker.sh $(PARAMS)Build, push docker images to Registry
make docker clean|prunesh/system/docker.sh $(PARAMS)Prune all docker containers, images, volumes, networks

UID/GID Handling

CURRENT_UID and CURRENT_GID are exported to every container so that WordPress, npm and composer outputs stay writable from the host. On macOS these values are forced to 1000 to match Docker’s default user.