ENV=local
pre:
ifdef e
ENV=${e}
endif
set-env :=\
export ENV=$(ENV) ;\
export COMPOSE_PATH_SEPARATOR=: ;\
export COMPOSE_FILE=docker-compose.$(ENV).yml ;
up: pre
$(set-env)\
docker-compose up -d
When executing a command
$ make up e=production
Hit something like that.
That's it.
Recommended Posts