diff --git a/compose.yaml b/compose.yaml index 9d2d851..d4a76b8 100644 --- a/compose.yaml +++ b/compose.yaml @@ -45,8 +45,8 @@ services: depends_on: - memgraph environment: - - MEMGRAPH_HOST=memgraph - - MEMGRAPH_PORT=7687 + - HTTP_PORT=:8080 + - MEMGRAPH_URI=bolt://memgraph:7687 - MEMGRAPH_USER= - MEMGRAPH_PASSWORD= healthcheck: diff --git a/docker-compose.db-adapter-integration-tests..yaml b/docker-compose.db-adapter-integration-tests..yaml deleted file mode 100644 index b4c9866..0000000 --- a/docker-compose.db-adapter-integration-tests..yaml +++ /dev/null @@ -1,81 +0,0 @@ ---- -services: - memgraph: - image: "memgraph/memgraph-mage:latest" - container_name: memgraph - volumes: - - mg_lib:/var/lib - - mg_log:/var/log - - mg_etc:/etc/memgraph - ports: - - "7687:7687" - - "7444:7444" - command: - - "--log-level=TRACE" - - "--storage-mode=ON_DISK_TRANSACTIONAL" - - "--storage-snapshot-interval-sec=86400" - - "--storage-snapshot-retention-count=60" - - "--storage-property-store-compression-enabled=true" - - "--storage-property-store-compression-level=mid" - - "--storage-snapshot-on-exit=true" - environment: - - MEMGRAPH_USER=memgraph - - MEMGRAPH_PASSWORD=memgraph - healthcheck: - test: ["CMD-SHELL", "echo 'RETURN 0;' | mgconsole || exit 1"] - interval: 10s - timeout: 5s - retries: 3 - start_period: 0s - lab: - image: memgraph/lab:latest - container_name: memgraph-lab - ports: - - "3036:3000" - depends_on: - - memgraph - environment: - - QUICK_CONNECT_MG_HOST=memgraph - - QUICK_CONNECT_MG_PORT=7687 - db-adapter: - build: apps/db-adapter - container_name: db-adapter - ports: - - "8080:8080" - depends_on: - - memgraph - environment: - - MEMGRAPH_HOST=memgraph - - MEMGRAPH_PORT=7687 - - MEMGRAPH_USER=memgraph - - MEMGRAPH_PASSWORD=memgraph - db-adapter-test: - image: golang:alpine - depends_on: - - db-adapter - volumes: - - ./apps/db-adapter:/app - command: - - cd /app - - && go mod download - - && go test -v ./... -run TestIntegration - -volumes: - mg_lib: - driver: local - driver_opts: - type: 'none' - o: 'bind' - device: './test-data/memgraph/lib' - mg_log: - driver: local - driver_opts: - type: 'none' - o: 'bind' - device: './test-data/memgraph/log' - mg_etc: - driver: local - driver_opts: - type: 'none' - o: 'bind' - device: './test-data/memgraph/etc' diff --git a/docker-compose.local-testing.yaml b/docker-compose.local-testing.yaml new file mode 100644 index 0000000..cbcfd6f --- /dev/null +++ b/docker-compose.local-testing.yaml @@ -0,0 +1,31 @@ +--- +services: + memgrapht: + image: "memgraph/memgraph-mage:latest" + container_name: memgrapht + ports: + - "7687:7687" + - "7444:7444" + environment: + - MEMGRAPH_USER=memgraph + - MEMGRAPH_PASSWORD=memgraph + healthcheck: + test: ["CMD-SHELL", "echo 'RETURN 0;' | mgconsole || exit 1"] + interval: 10s + timeout: 5s + retries: 3 + start_period: 0s + db-adapter: + build: + context: ./apps/db-adapter + dockerfile: ./integration-test.dockerfile + container_name: db-adapter + ports: + - "8080:8080" + depends_on: + - memgrapht + environment: + - HTTP_PORT=:8080 + - MEMGRAPH_URI=bolt://memgrapht:7687 + - MEMGRAPH_USER=memgraph + - MEMGRAPH_PASSWORD=memgraph