diff options
Diffstat (limited to 'Dockerfile')
-rw-r--r-- | Dockerfile | 17 |
1 files changed, 15 insertions, 2 deletions
@@ -1,9 +1,22 @@ +FROM node:14-bullseye-slim as builder +# the JRE is required by the openapi-generator-cli +RUN apt update && apt install -y openjdk-17-jre-headless +WORKDIR /usr/src/app + +COPY package*.json ./ + +RUN npm install + +COPY . . + +RUN npm run build + FROM openresty/openresty:1.21.4.1-4-alpine -RUN apk add gettext +RUN apk add gettext COPY server/resty /usr/local/openresty/lualib/resty/ COPY server/nginx* ./ COPY docker_entrypoint.sh . -COPY dist/frontend /usr/share/nginx/html +COPY --from=builder /usr/src/app/dist/frontend /usr/share/nginx/html ENTRYPOINT ["/docker_entrypoint.sh"] EXPOSE ${NGINX_PORT} CMD ["nginx", "-g", "daemon off;"] |