build(Makefile): fix shell and ghci targets for entrypoint
This commit is contained in:
parent
5ab47c6c4f
commit
123e9eb057
11
Makefile
11
Makefile
@ -3,6 +3,9 @@ export SHELL=bash
|
|||||||
export CLEAN_DEPENDENCIES ?= false
|
export CLEAN_DEPENDENCIES ?= false
|
||||||
export CLEAN_IMAGES ?= false
|
export CLEAN_IMAGES ?= false
|
||||||
|
|
||||||
|
export ENTRYPOINT ?= bash
|
||||||
|
export SRC
|
||||||
|
|
||||||
.PHONY: help
|
.PHONY: help
|
||||||
# HELP: print out this help message
|
# HELP: print out this help message
|
||||||
help:
|
help:
|
||||||
@ -79,11 +82,11 @@ start-%:
|
|||||||
.PHONY: shell-%
|
.PHONY: shell-%
|
||||||
# HELP(shell-$SERVICE): launch a (bash) shell inside a given service
|
# HELP(shell-$SERVICE): launch a (bash) shell inside a given service
|
||||||
shell-%:
|
shell-%:
|
||||||
docker compose run --build --no-deps $* bash
|
docker compose run --build --no-deps --entrypoint="$(ENTRYPOINT)" $*
|
||||||
.PHONY: ghci
|
.PHONY: ghci
|
||||||
# HELP: launch ghci
|
# HELP: launch ghci instance. Use in combination with SRC to specify the modules to be loaded by ghci: make ghci SRC=src/SomeModule.hs
|
||||||
ghci:
|
ghci: ENTRYPOINT=stack ghci $(SRC)
|
||||||
docker compose run --build --no-deps backend stack ghci $(SRC)
|
ghci: shell-backend ;
|
||||||
|
|
||||||
.PHONY: stop
|
.PHONY: stop
|
||||||
# HELP: stop all services
|
# HELP: stop all services
|
||||||
|
|||||||
Reference in New Issue
Block a user