2020-06-18 15:22:38 +02:00
|
|
|
FROM node:13 AS nodejs
|
|
|
|
|
|
|
|
RUN mkdir -p /build/app
|
|
|
|
WORKDIR /build/app
|
|
|
|
RUN useradd -m openslides
|
|
|
|
RUN chown -R openslides /build/app
|
|
|
|
|
|
|
|
USER root
|
2020-08-31 17:37:11 +02:00
|
|
|
RUN npm install -g @angular/cli@^10
|
2020-06-18 15:22:38 +02:00
|
|
|
RUN ng config -g cli.warnings.versionMismatch false
|
|
|
|
|
|
|
|
USER openslides
|
|
|
|
COPY package.json .
|
2020-08-31 17:37:11 +02:00
|
|
|
RUN npm ci
|
2020-06-18 15:22:38 +02:00
|
|
|
COPY browserslist *.json ./
|
|
|
|
COPY src ./src
|
|
|
|
RUN npm run build
|
|
|
|
|
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
|