aboutsummaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>2023-06-21 08:13:48 +0000
committerFiete Ostkamp <fiete.ostkamp@telekom.de>2023-06-21 08:16:29 +0000
commiteefbbf1e920764a0244f77a80262d9f682d34963 (patch)
tree5f04aad4ca12ca6f62ae9951174a9f7107b3fc41 /Dockerfile
parentd68841d9f75636575cd778838a8ceea5fd5aada3 (diff)
Make ui configurable via environment variables
Issue-ID: PORTALNG-4 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de> Change-Id: I31b968cef23c7727cfd8cfb2ba65691745a0b8f3
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile17
1 files changed, 15 insertions, 2 deletions
diff --git a/Dockerfile b/Dockerfile
index 4b0f004..fc88ab5 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -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;"]