From 83a9044015aed2cf3d566d243cb5cc6bfb50cf46 Mon Sep 17 00:00:00 2001 From: Hunter Long Date: Wed, 19 Dec 2018 19:52:53 -0800 Subject: [PATCH] heroku docker --- Dockerfile | 6 +++--- heroku.yml | 14 ++------------ 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/Dockerfile b/Dockerfile index c1eaf9eb..90233700 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"] diff --git a/heroku.yml b/heroku.yml index 03d797b6..2b8f79bb 100644 --- a/heroku.yml +++ b/heroku.yml @@ -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 \ No newline at end of file + docker: + web: Dockerfile \ No newline at end of file