Skip to main content

Makefile

Create a Makefile inside app/.docker-mate. Afterwards can add your own custom commands.

Examples

Add Build asset

Makefile
build-asset:
cd app/theme; yarn build

Run a command inside container

Runs as application user and passes arguments to console.
NOTE: ${WEB_ROOT} needs to be defined

Makefile
console:
docker exec -u application -it -w ${WEB_ROOT} $$(docker-compose ps -q app) bin/console $(ARGS)

Define help

Section header

Makefile
##:##########################
# Container operations: ##
#############################
  1. First line is will be an empty on and needs the : to get grepped
  2. Title Stats with # for be a comment followed by the header/title and : ## fo get grepped.

Command

Makefile
command: ## This is my new command
your-command

The double hash (##) is important, because we use single hash (#) for none help documentation.

professor