41 lines
1.2 KiB
Docker
41 lines
1.2 KiB
Docker
FROM --platform=linux/amd64 node:16-alpine AS build
|
|
|
|
WORKDIR /md
|
|
|
|
RUN ["apk", "add", "--no-cache", "python", "make", "g++"]
|
|
|
|
ARG VERSION=dev
|
|
ENV MD_VERSION $VERSION
|
|
ARG MODE=production
|
|
ENV WEBPACK_MODE $MODE
|
|
|
|
COPY ["./package.json", "./package-lock.json", "./"]
|
|
RUN ["npm", "ci"]
|
|
|
|
COPY ["./tsconfig.json", "postcss.config.js", "./webpack.config.js", "./elm.json", "./"]
|
|
COPY ["./src", "./src"]
|
|
COPY ["./assets", "./assets"]
|
|
RUN ["npm", "run", "build"]
|
|
|
|
FROM nginx:mainline-alpine
|
|
|
|
ARG BUILD_DATE
|
|
ARG VCS_REF
|
|
ARG VERSION=dev
|
|
|
|
EXPOSE 8080
|
|
|
|
LABEL maintainer="team@rereadgames.com"
|
|
LABEL org.label-schema.name="massivedecks/client"
|
|
LABEL org.label-schema.description="The web client for Massive Decks, a comedy party game."
|
|
LABEL org.label-schema.url="https://github.com/Lattyware/massivedecks"
|
|
LABEL org.label-schema.vcs-url="https://github.com/Lattyware/massivedecks"
|
|
LABEL org.label-schema.vendor="Reread Games"
|
|
LABEL org.label-schema.schema-version="1.0"
|
|
LABEL org.label-schema.build-date=$BUILD_DATE
|
|
LABEL org.label-schema.vcs-ref=$VCS_REF
|
|
LABEL org.label-schema.version=$VERSION
|
|
|
|
COPY --from=build ["/md/dist", "/usr/share/nginx/html/"]
|
|
COPY ["./nginx.conf", "/etc/nginx/nginx.conf"]
|