From b4a20ef414a3219d267b513b88b53aba9848393f Mon Sep 17 00:00:00 2001 From: Gully Date: Thu, 13 Jun 2019 12:46:56 +0300 Subject: [PATCH] Added available ports note in the "Launching docker containers" readme section. --- README.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 599355c..416632b 100644 --- a/README.md +++ b/README.md @@ -178,8 +178,15 @@ sudo mkdir -p /opt/trains/data/elastic && sudo chown -R 1000:1000 /opt/trains ### Launching Docker Containers -Launch the Docker containers. For example, if your data directory is `/opt/trains`, -then use the following commands: +**Note**: +* If your data directory is not `/opt/trains`, please find and replace `/opt/trains` in the following commands with your data directory path + +* Make sure ports `8008`, `8080` and `8081` are not in use before starting the docker containers, as the containers will fail to initialize if these ports are already taken. If the following commands shows no output, the ports are available: + ```bash + sudo netstat -tplna | egrep "8008|8080|8081" + ``` + +To launch the Docker containers, use the following commands: ```bash sudo docker run -d --restart="always" --name="trains-elastic" -e "ES_JAVA_OPTS=-Xms2g -Xmx2g" -e "bootstrap.memory_lock=true" -e "cluster.name=trains" -e "discovery.zen.minimum_master_nodes=1" -e "node.name=trains" -e "script.inline=true" -e "script.update=true" -e "thread_pool.bulk.queue_size=2000" -e "thread_pool.search.queue_size=10000" -e "xpack.security.enabled=false" -e "xpack.monitoring.enabled=false" -e "cluster.routing.allocation.node_initial_primaries_recoveries=500" -e "node.ingest=true" -e "http.compression_level=7" -e "reindex.remote.whitelist=*.*" -e "script.painless.regex.enabled=true" --network="host" -v /opt/trains/data/elastic:/usr/share/elasticsearch/data docker.elastic.co/elasticsearch/elasticsearch:5.6.16