Files
workavia-drive/tdrive/docker-compose.dev.tests.opensearch.yml
T
Anton Shepilov 927d5a62bb 🌟 Support of OpenSearch as a search database (#304)
- Added common search adapter for ES and OpenSearch
-  Open Search integration tests add to the build workflow
 - Stop docker-compose environment before running the next stop
2024-01-04 10:59:05 +01:00

64 lines
2.3 KiB
YAML

version: "3.4"
# docker-compose -f docker-compose.dev.tests.mongo.yml stop mongo; rm -R docker-data/mongo/; docker-compose -f docker-compose.dev.tests.mongo.yml run -e SEARCH_DRIVER=mongodb -e DB_DRIVER=mongodb node npm run test:e2e
services:
opensearch-node1:
image: opensearchproject/opensearch:latest # Specifying the latest available image - modify if you want a specific version
container_name: opensearch-node1
environment:
- cluster.name=opensearch-cluster # Name the cluster
- node.name=opensearch-node1 # Name the node that will run in this container
- discovery.seed_hosts=opensearch-node1 # Nodes to look for when discovering the cluster
- cluster.initial_cluster_manager_nodes=opensearch-node1 # Nodes eligible to serve as cluster manager
- bootstrap.memory_lock=true # Disable JVM heap memory swapping
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m" # Set min and max JVM heap sizes to at least 50% of system RAM
ulimits:
memlock:
soft: -1 # Set memlock to unlimited (no soft or hard limit)
hard: -1
nofile:
soft: 65536 # Maximum number of open files for the opensearch user - set to at least 65536
hard: 65536
# volumes:
# - opensearch-data1:/usr/share/opensearch/data # Creates volume called opensearch-data1 and mounts it to the container
ports:
- 9200:9200 # REST API
# - 9600:9600 # Performance Analyzer
# networks:
# - opensearch-net # All of the containers will join the same Docker bridge network
mongo:
container_name: mongo
image: mongo
volumes:
- ./docker-data/mongo:/data/db
ports:
- 27017:27017
node:
image: tdrive/tdrive-node:test
build:
context: .
dockerfile: docker/tdrive-node/Dockerfile
target: development
volumes:
- ./coverage/:/usr/src/app/coverage/
environment:
- LOG_LEVEL=error
- NODE_ENV=test
- DB_DRIVER
- PUBSUB_URLS=amqp://guest:guest@rabbitmq:5672
- SEARCH_OS_FLUSHINTERVAL=1
- SEARCH_OS_ENDPOINT=https://opensearch-node1:9200
- SEARCH_OS_PASSWORD=admin
- SEARCH_OS_USE_AUTH=true
- SEARCH_OS_USERNAME=admin
depends_on:
- mongo
- opensearch-node1
links:
- mongo
- opensearch-node1