From 0d007d32026151878c33a0c9f8805598a317df0a Mon Sep 17 00:00:00 2001 From: Toby Bellwood Date: Fri, 1 Dec 2023 19:21:05 +1100 Subject: [PATCH] add local-dev-yarn command --- Makefile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Makefile b/Makefile index 639210a88e..7ce8c15419 100644 --- a/Makefile +++ b/Makefile @@ -347,6 +347,21 @@ down: kill: docker ps --format "{{.Names}}" | grep lagoon | xargs -t -r -n1 docker rm -f -v +.PHONY: local-dev-yarn +local-dev-yarn: + $(MAKE) local-dev-yarn-stop + docker run --name local-dev-yarn -d -v ${PWD}:/app uselagoon/node-20-builder + docker exec local-dev-yarn bash -c "yarn install --frozen-lockfile" + docker exec local-dev-yarn bash -c "cd /app/node-packages/commons && yarn build" + echo -e "use 'yarn workspace api add package@version' to update a package in workspace api" + docker exec -it local-dev-yarn bash + $(MAKE) local-dev-yarn-stop + +.PHONY: local-dev-yarn-stop +local-dev-yarn-stop: + docker stop local-dev-yarn || true + docker rm local-dev-yarn || true + .PHONY: ui-development ui-development: build-ui-logs-development IMAGE_REPO=$(CI_BUILD_TAG) docker-compose -p $(CI_BUILD_TAG) --compatibility up -d api api-db local-api-data-watcher-pusher ui keycloak keycloak-db broker api-redis