mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2024-06-07 19:40:43 +00:00
[titan-gremlin] Automatically use 'itzg/cassandra' image's publish-as address
This commit is contained in:
parent
78d82b334b
commit
4dff67e03b
@ -9,14 +9,27 @@ fi
|
||||
rm -f /tmp/titan.properties
|
||||
|
||||
if [ -n "$CASS_PORT_9160_TCP_ADDR" ]; then
|
||||
|
||||
shortcut=/tmp/titan.properties
|
||||
cat >> /tmp/titan.properties <<END
|
||||
storage.backend=cassandra
|
||||
storage.hostname=$CASS_PORT_9160_TCP_ADDR
|
||||
END
|
||||
|
||||
elif [ -n "$CASS_ADDR" ]; then
|
||||
|
||||
shortcut=/tmp/titan.properties
|
||||
cat >> /tmp/titan.properties <<END
|
||||
storage.backend=cassandra
|
||||
storage.hostname=$CASS_ADDR
|
||||
END
|
||||
|
||||
fi
|
||||
|
||||
if [ -n "$ES_CLUSTER" -o -n "$ES_PORT_9300_TCP_PORT" ]; then
|
||||
|
||||
esAddr=${ES_ENV_PUBLISH_AS:-ES_PORT_9300_TCP_ADDR}
|
||||
|
||||
if [ -n "$ES_CLUSTER" -o -n "$esAddr" ]; then
|
||||
shortcut=/tmp/titan.properties
|
||||
cat >> /tmp/titan.properties <<END
|
||||
index.search.backend=elasticsearch
|
||||
@ -28,9 +41,11 @@ END
|
||||
index.search.elasticsearch.ext.cluster.name=$ES_CLUSTER
|
||||
END
|
||||
fi
|
||||
if [ -n "$ES_PORT_9300_TCP_PORT" ]; then
|
||||
if [ -n "$esAddr" ]; then
|
||||
# strip off the port spec, if present
|
||||
esAddr=$(echo $esAddr | cut -d: -f1)
|
||||
cat >> /tmp/titan.properties <<END
|
||||
index.search.hostname=$ES_PORT_9300_TCP_ADDR
|
||||
index.search.hostname=$esAddr
|
||||
END
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user