Skip to content

Commit

Permalink
updates based on testing
Browse files Browse the repository at this point in the history
  • Loading branch information
jh-bate committed Dec 13, 2017
1 parent f8822a0 commit 222837c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ ENV API_SECRET="This is a local API secret for everyone. BsscSHqSHiwrBMJsEGqbvXi
SEAGULL_SERVICE="{ \"type\": \"static\", \"hosts\": [{ \"protocol\": \"http\", \"host\": \"seagull:9120\" }] }" \
GATEKEEPER_SERVICE="{ \"type\": \"static\", \"hosts\": [{ \"protocol\": \"http\", \"host\": \"gatekeeper:9123\" }] }" \
# Container specific ENV
TIDEPOOL_TIDEWHISPERER_ENV="{\"hakken\": { \"host\": \"hakken:8000\" },\"gatekeeper\": { \"serviceSpec\": { \"type\": \"static\", \"hosts\": [\"http://gatekeeper:9123\"] } },\"seagull\": { \"serviceSpec\": { \"type\": \"static\", \"hosts\": [\"http://seagull:9120\"] } },\"shoreline\": {\"serviceSpec\": { \"type\": \"static\", \"hosts\": [\"http://shoreline:9107\"] },\"name\": \"tide-whisperer-local\",\"secret\": \"This needs to be the same secret everywhere. YaHut75NsK1f9UKUXuWqxNN0RUwHFBCy\",\"tokenRefreshInterval\": \"1h\"}}" \
TIDEPOOL_TIDEWHISPERER_SERVICE="{\"service\": {\"service\": \"tide-whisperer-local\",\"protocol\": \"http\",\"host\": \"localhost:9127\",\"keyFile\": \"config/key.pem\",\"certFile\": \"config/cert.pem\"},\"mongo\": {\"connectionString\": \"mongodb://mongo/data\"},\"schemaVersion\": {\"minimum\": 1,\"maximum\": 99}}"
TIDEPOOL_TIDE_WHISPERER_ENV="{\"hakken\": { \"host\": \"hakken:8000\" },\"gatekeeper\": { \"serviceSpec\": { \"type\": \"static\", \"hosts\": [\"http://gatekeeper:9123\"] } },\"seagull\": { \"serviceSpec\": { \"type\": \"static\", \"hosts\": [\"http://seagull:9120\"] } },\"shoreline\": {\"serviceSpec\": { \"type\": \"static\", \"hosts\": [\"http://shoreline:9107\"] },\"name\": \"tide-whisperer-local\",\"secret\": \"This needs to be the same secret everywhere. YaHut75NsK1f9UKUXuWqxNN0RUwHFBCy\",\"tokenRefreshInterval\": \"1h\"}}" \
TIDEPOOL_TIDE_WHISPERER_SERVICE="{\"service\": {\"service\": \"tide-whisperer-local\",\"protocol\": \"http\",\"host\": \"localhost:9127\",\"keyFile\": \"config/key.pem\",\"certFile\": \"config/cert.pem\"},\"mongo\": {\"connectionString\": \"mongodb://mongo/data\"},\"schemaVersion\": {\"minimum\": 1,\"maximum\": 99}}"

WORKDIR /go/src/github.com/tidepool-org/tide-whisperer

Expand Down
1 change: 1 addition & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ rm -rf dist
mkdir dist
go build -o dist/tide-whisperer tide-whisperer.go
cp start.sh dist/
cp env.sh dist/
4 changes: 2 additions & 2 deletions env.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export TIDEPOOL_TIDEWHISPERER_ENV='{
export TIDEPOOL_TIDE_WHISPERER_ENV='{
"hakken": { "host": "localhost:8000" },
"gatekeeper": { "serviceSpec": { "type": "static", "hosts": ["http://localhost:9123"] } },
"seagull": { "serviceSpec": { "type": "static", "hosts": ["http://localhost:9120"] } },
Expand All @@ -10,7 +10,7 @@ export TIDEPOOL_TIDEWHISPERER_ENV='{
}
}'

export TIDEPOOL_TIDEWHISPERER_SERVICE='{
export TIDEPOOL_TIDE_WHISPERER_SERVICE='{
"service": {
"service": "tide-whisperer-local",
"protocol": "http",
Expand Down
3 changes: 2 additions & 1 deletion start.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/sh -eu
#!/bin/bash -eu

source env.sh
exec ./tide-whisperer
2 changes: 1 addition & 1 deletion tide-whisperer.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func main() {
var config Config

if err := common.LoadEnvironmentConfig(
[]string{"TIDEPOOL_TIDEWHISPERER_SERVICE", "TIDEPOOL_TIDEWHISPERER_ENV"},
[]string{"TIDEPOOL_TIDE_WHISPERER_SERVICE", "TIDEPOOL_TIDE_WHISPERER_ENV"},
&config,
); err != nil {
log.Fatal(DATA_API_PREFIX, " Problem loading config: ", err)
Expand Down

0 comments on commit 222837c

Please sign in to comment.