2021-07-16 11:21:29 +02:00
|
|
|
FROM node:16 AS nodejs
|
2020-06-18 15:22:38 +02:00
|
|
|
|
|
|
|
RUN mkdir -p /build/app
|
|
|
|
WORKDIR /build/app
|
|
|
|
RUN useradd -m openslides
|
|
|
|
RUN chown -R openslides /build/app
|
|
|
|
|
|
|
|
USER root
|
2021-07-06 15:36:52 +02:00
|
|
|
RUN npm install -g @angular/cli@^12
|
2020-06-18 15:22:38 +02:00
|
|
|
RUN ng config -g cli.warnings.versionMismatch false
|
|
|
|
|
|
|
|
USER openslides
|
2020-05-28 11:40:41 +02:00
|
|
|
COPY package.json package-lock.json ./
|
|
|
|
RUN npm -v
|
2020-08-31 17:37:11 +02:00
|
|
|
RUN npm ci
|
2021-07-16 11:21:29 +02:00
|
|
|
COPY .browserslistrc *.json ./
|
2020-06-18 15:22:38 +02:00
|
|
|
COPY src ./src
|
2020-09-23 13:26:00 +02:00
|
|
|
RUN npm run build-to-dir /build/app/static
|
2020-06-18 15:22:38 +02:00
|
|
|
|
2020-08-14 16:21:21 +02:00
|
|
|
COPY docker/client-version.txt static/
|
2020-06-18 15:22:38 +02:00
|
|
|
|
|
|
|
FROM nginx
|
|
|
|
COPY --from=nodejs /build/app/static /usr/share/nginx/html
|
|
|
|
COPY docker/nginx.conf /etc/nginx/nginx.conf
|