diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..e78bb618 --- /dev/null +++ b/Makefile @@ -0,0 +1,17 @@ +# 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..9b859d12 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 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 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`.