From 36221c56e91e43761dbf1872b88712e737f4511b Mon Sep 17 00:00:00 2001 From: Bharath Date: Thu, 17 Oct 2024 11:39:02 +0530 Subject: [PATCH] Added docs on testing new changes locally --- src/SUMMARY.md | 3 ++- .../building-containers-locally.md | 24 +++++++++++++++++++ src/testing-new-changes/testing.md | 3 +++ 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 src/testing-new-changes/building-containers-locally.md create mode 100644 src/testing-new-changes/testing.md diff --git a/src/SUMMARY.md b/src/SUMMARY.md index b3927a1..4d4687c 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -40,4 +40,5 @@ - [New API Scanner](./new-scanner-integrations/new-scanner-integration-api.md) - [Add scanner to config file](./new-scanner-integrations/command-config-file.md) - [Install instructions in DockerFile](./new-scanner-integrations/command-docker-file.md) - +- [🔎 Testing new changes](./testing-new-changes/testing.md) + - [Building containers locally](./testing-new-changes/building-containers-locally.md) \ No newline at end of file diff --git a/src/testing-new-changes/building-containers-locally.md b/src/testing-new-changes/building-containers-locally.md new file mode 100644 index 0000000..06a3782 --- /dev/null +++ b/src/testing-new-changes/building-containers-locally.md @@ -0,0 +1,24 @@ +# Building containers locally + +By default, Mantis Docker setup pulls Mantis container from Github Container Registry. To test the changes you made locally, you need to build the mantis docker container locally. + +To achieve this, in your `setup/docker/docker-compose.yml` uncomment the following lines and comment the "image" directive. + +```yaml +#build: +# dockerfile: Dockerfile +# context: ../../ +``` + +Final mantis container block would look like, + +```yaml +mantis: + build: + dockerfile: Dockerfile + context: ../../ +#image: ghcr.io/phonepe/mantis:latest +... snipped ... +``` + +Now your mantis container is built locally and you can test your changes. \ No newline at end of file diff --git a/src/testing-new-changes/testing.md b/src/testing-new-changes/testing.md new file mode 100644 index 0000000..99913c5 --- /dev/null +++ b/src/testing-new-changes/testing.md @@ -0,0 +1,3 @@ +# Testing new changes + +This section covers testing new changes locally. \ No newline at end of file