mirror of
https://github.com/Luzifer/mondash.git
synced 2024-11-09 16:10:01 +00:00
Knut Ahlers
7d99bb4e38
Squashed commit of the following: commit cb9373983dde31eb56c45e78c17c44ae2e38ee00 Author: Knut Ahlers <knut@ahlers.me> Date: Sun Oct 18 03:31:25 2020 +0200 Update Dockerfile for readonly mod Signed-off-by: Knut Ahlers <knut@ahlers.me> commit b21597f19808c79ad63b30033100e383d1d80034 Author: Knut Ahlers <knut@ahlers.me> Date: Sun Oct 18 03:28:52 2020 +0200 Re-generate assets file Signed-off-by: Knut Ahlers <knut@ahlers.me> commit 6e06ee024afb60b5c374c3935b02c1a1b6e5fefb Author: Knut Ahlers <knut@ahlers.me> Date: Sun Oct 18 03:27:33 2020 +0200 Execute `npm audit fix` Signed-off-by: Knut Ahlers <knut@ahlers.me> commit d83316da0fb3103c92a47d58833a784ebe3b28a8 Author: Knut Ahlers <knut@ahlers.me> Date: Sun Oct 18 03:26:05 2020 +0200 Add go modules file for client Signed-off-by: Knut Ahlers <knut@ahlers.me> commit 05dcacf2bcda834a7ff9c370ea0cb838d352734e Author: Knut Ahlers <knut@ahlers.me> Date: Sun Oct 18 03:25:00 2020 +0200 Update import paths, add go modules files Signed-off-by: Knut Ahlers <knut@ahlers.me> commit 7c38dff66575475c8e1f973228db3d9b269984db Author: Knut Ahlers <knut@ahlers.me> Date: Sun Oct 18 03:23:35 2020 +0200 Delete old vendoring / dep management Signed-off-by: Knut Ahlers <knut@ahlers.me> Signed-off-by: Knut Ahlers <knut@ahlers.me>
42 lines
859 B
Docker
42 lines
859 B
Docker
FROM node:alpine as node_builder
|
|
|
|
COPY . /src/mondash
|
|
WORKDIR /src/mondash/src
|
|
|
|
RUN set -ex \
|
|
&& npm ci \
|
|
&& npm run build
|
|
|
|
|
|
FROM golang:alpine as builder
|
|
|
|
COPY . /go/src/github.com/Luzifer/mondash
|
|
WORKDIR /go/src/github.com/Luzifer/mondash
|
|
|
|
RUN set -ex \
|
|
&& apk add --update git \
|
|
&& go install \
|
|
-ldflags "-X main.version=$(git describe --tags --always || echo dev)" \
|
|
-mod=readonly
|
|
|
|
FROM alpine:latest
|
|
|
|
ENV FRONTEND_DIR=/usr/local/share/mondash/frontend \
|
|
STORAGE=file:///data
|
|
|
|
LABEL maintainer "Knut Ahlers <knut@ahlers.me>"
|
|
|
|
RUN set -ex \
|
|
&& apk --no-cache add \
|
|
ca-certificates
|
|
|
|
COPY --from=builder /go/bin/mondash /usr/local/bin/mondash
|
|
COPY --from=node_builder /src/mondash/frontend /usr/local/share/mondash/frontend
|
|
|
|
EXPOSE 3000
|
|
VOLUME ["/data"]
|
|
|
|
ENTRYPOINT ["/usr/local/bin/mondash"]
|
|
CMD ["--"]
|
|
|
|
# vim: set ft=Dockerfile:
|