heroku docker

pull/116/head
Hunter Long 2018-12-19 19:52:53 -08:00
parent 4dadd14128
commit 83a9044015
2 changed files with 5 additions and 15 deletions

View File

@ -20,7 +20,7 @@ MAINTAINER "Hunter Long (https://github.com/hunterlong)"
ARG VERSION
ENV IS_DOCKER=true
ENV STATPING_DIR=/app
ENV PORT=8080
RUN apk --no-cache add curl jq
COPY --from=base /usr/local/bin/sass /usr/local/bin/sass
@ -28,8 +28,8 @@ COPY --from=base /go/bin/statping /usr/local/bin/statping
WORKDIR /app
VOLUME /app
EXPOSE 8080
EXPOSE $PORT
HEALTHCHECK --interval=5s --timeout=5s --retries=5 CMD curl -s "http://localhost:8080/health" | jq -r -e ".online==true"
CMD ["statping"]
CMD ["statping", "--port", "$PORT"]

View File

@ -1,13 +1,3 @@
setup:
config:
GOVERSION: go1.11
build:
languages:
- go
pre:
- export PATH=$GOPATH/bin:$PATH
- go get github.com/GeertJohan/go.rice
- go get github.com/GeertJohan/go.rice/rice
- cd $GOPATH/src/github.com/hunterlong/statping/source && rice embed-go
run:
web: cmd --port $PORT
docker:
web: Dockerfile