September 2018
Intermediate to advanced
764 pages
20h 6m
English
We’ve successfully used Elasticsearch inside a Docker container rather than our local instance. This is great for testing, because any changes to the database are erased after the container is stopped and removed.
Update scripts/e2e.test.sh to the following:
#!/bin/bash # Set environment variables from .env and set NODE_ENV to testsource <(dotenv-export | sed 's/\\n/\n/g')export NODE_ENV=test # Make sure our local Elasticsearch service is not runningecho -ne ' 5% [## ] Stopping local Elasticsearch service \r'sudo systemctl stop elasticsearch.service# Download Elasticsearch Docker imageecho -ne ' 10% [#### ] Downloading Elasticsearch image \r'docker pull docker.elastic.co/elasticsearch/elasticsearch-oss:${ELASTICSEARCH_VERSION} ...Read now
Unlock full access