Small enhancements to the example app

- Explicity add go app to the example container, so it fails if you haven't built it.
- spin up 2 goapps and 3 elastic searches
This commit is contained in:
Tom Wilkie
2015-05-26 14:54:46 +00:00
parent 68a11db3e8
commit e8da5903f1
4 changed files with 23 additions and 5 deletions

View File

@@ -10,7 +10,7 @@ qotd/qotd: qotd/qotd.o
gcc -o $@ $< $(CFLAGS)
goapp/app: goapp/app.go
go build -o goapp/app ./goapp
go build -ldflags "-extldflags \"-static\"" -tags netgo -o goapp/app ./goapp
clean:
rm -f qotd/*.o qotd/qotd goapp/app

View File

@@ -10,20 +10,30 @@ pyapp:
links:
- qotd
- redis
- goapp
- goapp1
- goapp2
qotd:
build: qotd
expose:
- "4446"
redis:
image: redis
goapp:
goapp1:
build: goapp
ports:
- "8080"
links:
- elasticsearch1
- elasticsearch2
- elasticsearch3
goapp2:
build: goapp
ports:
- "8080"
links:
- elasticsearch1
- elasticsearch2
- elasticsearch3
elasticsearch1:
image: elasticsearch
expose:
@@ -36,3 +46,11 @@ elasticsearch2:
- "9300"
links:
- elasticsearch1
elasticsearch3:
image: elasticsearch
expose:
- "9200"
- "9300"
links:
- elasticsearch1
- elasticsearch2

View File

@@ -1,5 +1,5 @@
FROM gliderlabs/alpine
MAINTAINER Weaveworks Inc <help@weave.works>
WORKDIR /home/weave
ADD . /home/weave/
ADD app entrypoint.sh /home/weave/
ENTRYPOINT ["/home/weave/entrypoint.sh"]

View File

@@ -1,2 +1,2 @@
#!/bin/sh
exec /home/weave/app elasticsearch1 elasticsearch2
exec /home/weave/app elasticsearch1 elasticsearch2 elasticsearch3