From 85eacf13f3e24fa0f95a75a7e202d7996ba7e55f Mon Sep 17 00:00:00 2001
From: kaw67872 <kawtar.laariche@iais.fraunhofer.de>
Date: Mon, 27 Jan 2025 12:30:20 +0100
Subject: [PATCH] fix dockerfile

---
 Dockerfile |  4 +++-
 nginx.conf | 15 +++++++++++++++
 2 files changed, 18 insertions(+), 1 deletion(-)
 create mode 100644 nginx.conf

diff --git a/Dockerfile b/Dockerfile
index 88b2307..e8c0bf5 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -23,8 +23,10 @@ RUN npm run ng build --configuration=prod
 FROM nginx:alpine
 
 # Copy the built app from the 'build' stage to the current stage
-COPY --from=build /usr/src/app/dist/graphene-ui /usr/share/nginx/html
+COPY --from=build /usr/src/app/dist/graphene-ui/browser /usr/share/nginx/html
 
+# Copy the custom Nginx configuration file
+COPY nginx.conf /etc/nginx/conf.d/default.conf
 
 # Start Nginx
 CMD ["nginx", "-g", "daemon off;"]
diff --git a/nginx.conf b/nginx.conf
new file mode 100644
index 0000000..a40436b
--- /dev/null
+++ b/nginx.conf
@@ -0,0 +1,15 @@
+server {
+    listen 80;
+
+    server_name localhost;
+
+    root /usr/share/nginx/html;
+    index index.html;
+
+    location / {
+        # Angular routing fallback
+        try_files $uri /index.html;
+    }
+
+    error_page 404 /index.html;
+}
-- 
GitLab