build(Makefile): Work on stack-calls.

This commit is contained in:
Stephan Barth 2024-11-04 18:57:45 +01:00
parent ad8edfd448
commit e8d8aafccd
2 changed files with 5 additions and 5 deletions

View File

@ -32,7 +32,7 @@ export UNIWORXDB_OPTS ?= -cf
export PROD ?= false
ifneq ($(PROD),true)
export --DEVELOPMENT=--flag uniworx:dev
export --DEVELOPMENT=--flag=uniworx:dev
endif
export DATE := $(shell date +'%Y-%m-%dT%H-%M-%S')
@ -228,10 +228,10 @@ endif
--start-backend:
DEV_PORT_HTTP=`cat $(CONTAINER_FILE) | grep 'DEV_PORT_HTTP=' | sed 's/DEV_PORT_HTTP=//'`; \
DEV_PORT_HTTPS=`cat $(CONTAINER_FILE) | grep 'DEV_PORT_HTTPS=' | sed 's/DEV_PORT_HTTPS=//'`; \
stack --work-dir=.stack-work-run $(--DEVELOPMENT) exec -- yesod devel -p "$${DEV_PORT_HTTP}" -q "$${DEV_PORT_HTTPS}"
stack --work-dir=.stack-work-run --lock-file ignore exec -- yesod devel -p "$${DEV_PORT_HTTP}" -q "$${DEV_PORT_HTTPS}"
# HELP(compile-backend): compile backend binaries
--compile-backend:
stack build --fast --profile --library-profiling --executable-profiling --flag uniworx:-library-only $(--DEVELOPMENT) --local-bin-path $$(pwd)/bin
stack build --fast --profile --library-profiling --lock-file ignore --executable-profiling --flag uniworx:-library-only $(--DEVELOPMENT) --local-bin-path $$(pwd)/bin
# HELP(lint-backend): lint backend
--lint-backend:
stack build --test --fast --work-dir=.stack-work-test --flag uniworx:library-only $(--DEVELOPMENT) uniworx:test:hlint

View File

@ -21,11 +21,11 @@ RUN mkdir -p "${PROJECT_DIR}/.stack"
ENV STACK_ROOT="${PROJECT_DIR}/.stack"
RUN make -- --.stack STACK_ROOT=${STACK_ROOT} IN_CONTAINER=true
RUN stack --work-dir .stack-work-run build yesod-bin
RUN stack --work-dir .stack-work-run install yesod-bin
RUN chmod -R 777 .stack .stack-work-build .stack-work-run .stack-work-test .stack-work-doc || :
ENV FRADRIVE_MAKE_TARGET=--start-backend
ENTRYPOINT make -- ${FRADRIVE_MAKE_TARGET} STACK_ROOT="${STACK_ROOT}" IN_CONTAINER=true CONTAINER_FILE="${CONTAINER_FILE}"
EXPOSE 3000/tcp
EXPOSE 3443/tcp
EXPOSE 3443/tcp