ministream/Dockerfile
2023-12-02 13:58:02 +01:00

25 lines
704 B
Docker

FROM node:latest as frontend-builder
WORKDIR /app
COPY ministream-frontend/package-lock.json /app/package-lock.json
COPY ministream-frontend/package.json /app/package.json
COPY ministream-frontend/tsconfig.json /app/tsconfig.json
RUN npm install
COPY ministream-frontend/src /app/src
RUN npm run-script build
FROM golang:alpine as builder
WORKDIR /app
COPY go.mod /app/go.mod
COPY go.sum /app/go.sum
RUN go mod download
COPY --from=frontend-builder /app/dist /app/server/static
COPY main.go /app
COPY server /app/server
RUN go build -o ministream main.go
FROM alpine:latest
COPY --from=builder /app/ministream /usr/bin/ministream
EXPOSE 8080
EXPOSE 50000-50050/udp
CMD ["/usr/bin/ministream", "serve"]