-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathrun
35 lines (29 loc) · 883 Bytes
/
run
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
CONTAINER_ID=$(hostname)
BRIDGE=$(cat /etc/hosts|grep $CONTAINER_ID|cut -s -f1)
if [[ ! -z $1 ]]; then BRIDGE=$1; fi
CONFIG=$(cat <<EOF
// https://github.com/adamw/elasticmq#installation-stand-alone
include classpath("application.conf")
// What is the outside visible address of this ElasticMQ node (used by rest-sqs)
node-address {
protocol = http
// this is specifically for docker
host = $BRIDGE
port = 9324
context-path = ""
}
rest-sqs {
enabled = true
bind-port = 9324
bind-hostname = "0.0.0.0"
// Possible values: relaxed, strict
sqs-limits = relaxed
}
EOF
)
echo -e "$CONFIG" > /elasticmq/elasticmq.conf
echo "Wrote config to /elasticmq/elasticmq.conf:"
cat /elasticmq/elasticmq.conf
echo "============================================"
java -jar -Dconfig.file=/elasticmq/elasticmq.conf /elasticmq/elasticmq-0.0.8.jar