summaryrefslogtreecommitdiffstats
path: root/Dockerfile
blob: de1c28d19a0aae7c005d67b000cc1722df5cf640 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# the JRE is required by the openapi-generator-cli
FROM eclipse-temurin:17-jre-alpine as builder
RUN apk update && \
    apk add nodejs npm
WORKDIR /usr/src/app

COPY package*.json ./

RUN npm install

COPY . .

RUN npm run build -- --configuration production

FROM nginxinc/nginx-unprivileged:alpine-slim
USER root
RUN apk add --no-cache gettext # required for envsubst in docker_entrypoint.sh
USER nginx

COPY --chown=nginx:nginx server/nginx* ./
COPY --chown=nginx:nginx docker_entrypoint.sh .
COPY --from=builder --chown=nginx:nginx /usr/src/app/dist/frontend /usr/share/nginx/html
ENTRYPOINT ["/docker_entrypoint.sh"]
EXPOSE ${NGINX_PORT}
CMD ["nginx", "-g", "daemon off;"]