support docker compose testing.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
FROM golang:1.6
|
||||
FROM golang:1.6.2-alpine
|
||||
|
||||
MAINTAINER Bo-Yi Wu <appleboy.tw@gmail.com>
|
||||
|
||||
RUN apk update \
|
||||
&& apk add git make && rm -rf /var/cache/apk/*
|
||||
|
||||
# install glide package management.
|
||||
RUN go get github.com/Masterminds/glide && cd $GOPATH/src/github.com/Masterminds/glide && make install
|
||||
RUN mkdir -p $GOPATH/src/github.com/appleboy/gorush
|
||||
Add . $GOPATH/src/github.com/appleboy/gorush/
|
||||
RUN git clone https://github.com/appleboy/gorush.git $GOPATH/src/github.com/appleboy/gorush/
|
||||
WORKDIR $GOPATH/src/github.com/appleboy/gorush
|
||||
RUN sed -i"" -e "s/localhost/redis/g" config/config.yml
|
||||
RUN sed -i"" -e "s/localhost/redis/g" gorush/status_test.go
|
||||
|
||||
14
docker/docker-compose.testing.yml
Normal file
14
docker/docker-compose.testing.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
gorush:
|
||||
build: "."
|
||||
dockerfile: Dockerfile.testing
|
||||
links:
|
||||
- redis
|
||||
privileged: true
|
||||
environment:
|
||||
- ANDROID_API_KEY
|
||||
- ANDROID_TEST_TOKEN
|
||||
command: /bin/sh -c "make test"
|
||||
|
||||
redis:
|
||||
image: redis:alpine
|
||||
privileged: true
|
||||
Reference in New Issue
Block a user