2020-08-14 23:13:34 +00:00
|
|
|
# build environment
|
|
|
|
FROM --platform=$BUILDPLATFORM node:current-alpine as build-stage
|
2020-08-24 01:08:44 +00:00
|
|
|
RUN mkdir /app && chown -R node:node /app
|
2020-08-14 23:13:34 +00:00
|
|
|
WORKDIR /app
|
2020-08-24 01:08:44 +00:00
|
|
|
COPY --chown=node:node package*.json ./
|
2020-08-14 23:13:34 +00:00
|
|
|
RUN npm ci
|
2020-08-24 01:08:44 +00:00
|
|
|
COPY --chown=node:node . .
|
2020-08-14 23:13:34 +00:00
|
|
|
|
2020-08-27 23:22:46 +00:00
|
|
|
ARG SERVERS
|
2020-08-14 23:13:34 +00:00
|
|
|
ARG SOURCE_BRANCH
|
|
|
|
ARG REVISION
|
|
|
|
|
|
|
|
RUN npm run build
|
|
|
|
|
|
|
|
# production environment
|
|
|
|
FROM nginx:alpine as production-stage
|
|
|
|
LABEL org.opencontainers.image.title="SyncLounge Web"
|
|
|
|
LABEL org.opencontainers.image.description="Enjoy Plex with your friends. In Sync. Together."
|
|
|
|
LABEL org.opencontainers.image.url="https://synclounge.tv/"
|
|
|
|
LABEL org.opencontainers.image.source="https://github.com/samcm/synclounge"
|
|
|
|
LABEL org.opencontainers.image.vendor="SyncLounge"
|
|
|
|
LABEL org.opencontainers.image.licenses="MIT"
|
|
|
|
LABEL org.opencontainers.image.documentation="https://docs.synclounge.tv/"
|
2020-08-24 01:08:44 +00:00
|
|
|
|
|
|
|
COPY --chown=nginx:nginx --from=build-stage /app/dist /usr/share/nginx/html
|
|
|
|
|
|
|
|
ARG VERSION
|
|
|
|
LABEL org.opencontainers.image.version=$VERSION
|
|
|
|
|
|
|
|
ARG REVISION
|
|
|
|
LABEL org.opencontainers.image.revision=$REVISION
|
|
|
|
|
|
|
|
ARG BUILD_DATE
|
|
|
|
LABEL org.opencontainers.image.created=$BUILD_DATE
|