30 lines
691 B
Plaintext
30 lines
691 B
Plaintext
FROM golang:1.10.3
|
|
|
|
WORKDIR $GOPATH/src/github.com/hunterlong/statup
|
|
|
|
COPY . .
|
|
ADD ./Makefile ./Makefile
|
|
RUN make deps
|
|
RUN make compile
|
|
RUN make install
|
|
|
|
RUN apt update && \
|
|
apt install -y postgresql apg
|
|
|
|
RUN wget -q https://assets.statup.io/sass && \
|
|
chmod +x sass && \
|
|
mv sass /usr/local/bin/sass
|
|
|
|
ENV VERSION=$(VERSION)
|
|
ENV IS_DOCKER=true
|
|
ENV SASS=/usr/local/bin/sass
|
|
ENV CMD_FILE=/usr/bin/cmd
|
|
ENV ONLY_DB=sqlite
|
|
ENV STATUP_DIR=/go/src/github.com/hunterlong/statup
|
|
ENV GO_ENV=test
|
|
|
|
RUN printf "#!/usr/bin/env sh\n\$1\n" > $CMD_FILE && \
|
|
chmod +x $CMD_FILE
|
|
|
|
EXPOSE 8080
|
|
ENTRYPOINT go test ./... -p 1 -ldflags="-X main.VERSION=$(VERSION)" -coverprofile=coverage.out -v |