From 2bd95054c2fc76ae6cbb8701c0cd29fc787ca724 Mon Sep 17 00:00:00 2001 From: Devin Ford Date: Fri, 7 Apr 2023 11:00:35 -0400 Subject: [PATCH 1/3] feat: add Makefile and update README --- Makefile | 19 +++++++++++++++++++ README.md | 4 +++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..c8ed33e1 --- /dev/null +++ b/Makefile @@ -0,0 +1,19 @@ +ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) + +# Local runs for storedog +local-start: + if [[ "$(PROFILE)" ]]; then \ + rm -rf ./services/backend/tmp ./services/backend/log; \ + docker-compose --profile "$(PROFILE)" up --force-recreate -d; \ + else \ + rm -rf ./services/backend/tmp ./services/backend/log; \ + docker-compose up --force-recreate -d; \ + fi + +local-stop: + if [[ "$(PROFILE)" ]]; then \ + docker-compose --profile "$(PROFILE)" down; \ + else \ + docker-compose down; \ + fi + \ No newline at end of file diff --git a/README.md b/README.md index 4cc321f4..2e213dca 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,9 @@ Open the `.env` file under the project root and enter the values for the variabl **3.** Open the `./services/frontend/site/.env.local` file and enter the values for the variables. The default values should all work except for the empty `NEXT_PUBLIC_DD_APPLICATION_KEY` and `NEXT_PUBLIC_CLIENT_TOKEN`, which are required to enable RUM. -**4.** Start the app: `docker-compose up` +**4.** Start the app: `make local-start` + **4a.** If you wan to work with a profile for a specific lab, you can pass that in as an argument `make local-start PROFILE=` +**5.** When you're finished you can run `make local-stop` or `make local-stop PROFILE=` if working with a profile ## Image publication Images are stored in our public ECR repo `public.ecr.aws/x2b9z2t7`. On PR merges, only the affected services will be pushed to the ECR repo, using the `latest` tag. For example, if you only made changes to the `backend` service, then only the `backend` Github workflow will trigger and publish `public.ecr.aws/x2b9z2t7/storedog/backend:latest`. From d55102f185beb5c47e896ff6aad97540e6655eae Mon Sep 17 00:00:00 2001 From: Devin Ford Date: Fri, 7 Apr 2023 11:03:09 -0400 Subject: [PATCH 2/3] fix: remove leftover var --- Makefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Makefile b/Makefile index c8ed33e1..e78bb618 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,3 @@ -ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) - # Local runs for storedog local-start: if [[ "$(PROFILE)" ]]; then \ From 0775939caa53aa4ba11fac959a5eec36380a8042 Mon Sep 17 00:00:00 2001 From: Devin Ford Date: Fri, 7 Apr 2023 11:12:11 -0400 Subject: [PATCH 3/3] fix: typo in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2e213dca..9b859d12 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Open the `.env` file under the project root and enter the values for the variabl Open the `./services/frontend/site/.env.local` file and enter the values for the variables. The default values should all work except for the empty `NEXT_PUBLIC_DD_APPLICATION_KEY` and `NEXT_PUBLIC_CLIENT_TOKEN`, which are required to enable RUM. **4.** Start the app: `make local-start` - **4a.** If you wan to work with a profile for a specific lab, you can pass that in as an argument `make local-start PROFILE=` + **4a.** If you want to work with a profile for a specific lab, you can pass that in as an argument `make local-start PROFILE=` **5.** When you're finished you can run `make local-stop` or `make local-stop PROFILE=` if working with a profile ## Image publication