From 0e256ec9a13c0115afde833ce8ad2568a75d59bb Mon Sep 17 00:00:00 2001 From: Renan Souza Date: Tue, 3 Dec 2024 17:24:14 -0500 Subject: [PATCH] Removing docker volume --- .github/workflows/run-tests.yml | 6 ++++++ deployment/compose-kafka.yml | 11 +++++++++-- deployment/compose.yml | 5 +++++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index f62aad7e..b2afb40f 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -86,6 +86,9 @@ jobs: - name: Clean up log files run: find /home/runner/runners/ -type f -name "*.log" -exec sh -c 'echo {}; >"{}"' \; + - name: Clean up Docker volume + run: docker volume rm flowcept_mongo_data + - name: Start docker compose with kafka run: docker compose -f deployment/compose-kafka.yml up -d @@ -110,3 +113,6 @@ jobs: - name: Clean up log files again run: find /home/runner/runners/ -type f -name "*.log" -exec sh -c 'echo {}; >"{}"' \; + + - name: Clean up Docker volume + run: docker volume rm flowcept_mongo_data \ No newline at end of file diff --git a/deployment/compose-kafka.yml b/deployment/compose-kafka.yml index 6bfa4783..4c2600c9 100644 --- a/deployment/compose-kafka.yml +++ b/deployment/compose-kafka.yml @@ -9,10 +9,10 @@ services: flowcept_mongo: container_name: flowcept_mongo image: mongo:latest - # volumes: - # - /Users/rsr/Downloads/mongo_data/db:/data/db ports: - 27017:27017 + volumes: + - mongo_data:/data/db zookeeper: image: confluentinc/cp-zookeeper:6.1.1 @@ -54,3 +54,10 @@ services: echo -e 'Successfully created the following topics:' kafka-topics --bootstrap-server kafka:29092 --list " + +networks: + flowcept: + driver: bridge + +volumes: + mongo_data: \ No newline at end of file diff --git a/deployment/compose.yml b/deployment/compose.yml index 712de8f7..5e5490ee 100644 --- a/deployment/compose.yml +++ b/deployment/compose.yml @@ -11,11 +11,16 @@ services: image: mongo:latest ports: - 27017:27017 + volumes: + - mongo_data:/data/db networks: flowcept: driver: bridge +volumes: + mongo_data: + # This is just for the cases where one does not want to use the same Redis instance for caching and messaging, but # it's not required to have separate instances. # local_interceptor_cache: