Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ dev
config.yml
*.db
tmp
Dockerfile
15 changes: 8 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM golang:1.13.5-alpine as base
FROM golang:1.13.5 as base
LABEL maintainer="Hunter Long (https://github.com/hunterlong)"
ARG VERSION
RUN apk add --no-cache libstdc++ gcc g++ make git ca-certificates linux-headers wget curl jq libsass
RUN curl -L -s https://assets.statping.com/sass -o /usr/local/bin/sass && \
chmod +x /usr/local/bin/sass
RUN apt-get update \
&& apt-get install -y binutils-gold gcc g++ make git ca-certificates wget curl jq libsass-dev sassc \
&& rm /var/lib/apt/lists/* -fR
WORKDIR /go/src/github.com/hunterlong/statping
ADD Makefile go.mod /go/src/github.com/hunterlong/statping/
RUN go mod vendor && \
Expand All @@ -12,16 +12,17 @@ ADD . /go/src/github.com/hunterlong/statping
RUN make install

# Statping :latest Docker Image
FROM alpine:latest
FROM debian:buster
LABEL 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 libsass
RUN apt-get update \
&& apt-get install -y curl jq sassc \
&& rm /var/lib/apt/lists/* -fR

COPY --from=base /usr/local/bin/sass /usr/local/bin/sass
COPY --from=base /go/bin/statping /usr/local/bin/statping

WORKDIR /app
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ watch:

# compile assets using SASS and Rice. compiles scss -> css, and run rice embed-go
compile: generate
sass source/scss/base.scss source/css/base.css
sassc source/scss/base.scss source/css/base.css
cd source && rice embed-go
rm -rf .sass-cache

Expand Down