2021-05-01 13:13:32 +00:00
|
|
|
FROM node:14-alpine as node_builder
|
2019-05-24 22:03:06 +00:00
|
|
|
|
|
|
|
COPY . /src/mondash
|
|
|
|
WORKDIR /src/mondash/src
|
|
|
|
|
|
|
|
RUN set -ex \
|
2020-10-31 14:54:50 +00:00
|
|
|
&& apk --no-cache add \
|
|
|
|
build-base \
|
2021-05-01 13:13:32 +00:00
|
|
|
python3 \
|
2019-05-24 22:03:06 +00:00
|
|
|
&& npm ci \
|
|
|
|
&& npm run build
|
|
|
|
|
|
|
|
|
2018-09-16 12:49:26 +00:00
|
|
|
FROM golang:alpine as builder
|
2016-01-23 12:07:07 +00:00
|
|
|
|
2019-05-24 22:03:06 +00:00
|
|
|
COPY . /go/src/github.com/Luzifer/mondash
|
2016-01-23 12:07:07 +00:00
|
|
|
WORKDIR /go/src/github.com/Luzifer/mondash
|
|
|
|
|
2016-03-27 16:02:14 +00:00
|
|
|
RUN set -ex \
|
2018-09-16 12:49:26 +00:00
|
|
|
&& apk add --update git \
|
2020-10-18 01:34:10 +00:00
|
|
|
&& go install \
|
|
|
|
-ldflags "-X main.version=$(git describe --tags --always || echo dev)" \
|
|
|
|
-mod=readonly
|
2018-09-16 12:49:26 +00:00
|
|
|
|
|
|
|
FROM alpine:latest
|
|
|
|
|
2019-05-24 22:03:06 +00:00
|
|
|
ENV FRONTEND_DIR=/usr/local/share/mondash/frontend \
|
|
|
|
STORAGE=file:///data
|
|
|
|
|
2018-09-16 12:49:26 +00:00
|
|
|
LABEL maintainer "Knut Ahlers <knut@ahlers.me>"
|
|
|
|
|
|
|
|
RUN set -ex \
|
2020-10-18 01:34:10 +00:00
|
|
|
&& apk --no-cache add \
|
|
|
|
ca-certificates
|
2018-09-16 12:49:26 +00:00
|
|
|
|
|
|
|
COPY --from=builder /go/bin/mondash /usr/local/bin/mondash
|
2019-05-24 22:03:06 +00:00
|
|
|
COPY --from=node_builder /src/mondash/frontend /usr/local/share/mondash/frontend
|
2016-03-27 16:02:14 +00:00
|
|
|
|
|
|
|
EXPOSE 3000
|
2019-05-24 22:03:06 +00:00
|
|
|
VOLUME ["/data"]
|
2016-01-23 12:07:07 +00:00
|
|
|
|
2018-09-16 12:49:26 +00:00
|
|
|
ENTRYPOINT ["/usr/local/bin/mondash"]
|
2016-03-27 16:02:14 +00:00
|
|
|
CMD ["--"]
|
2018-09-16 12:49:26 +00:00
|
|
|
|
|
|
|
# vim: set ft=Dockerfile:
|