From 472a6dc50c14636799f114437c09acfda460e60c Mon Sep 17 00:00:00 2001 From: Siris <40269790+siriscmv@users.noreply.github.com> Date: Wed, 20 Nov 2024 13:01:54 -0500 Subject: [PATCH 1/2] fix(frontend): fallback to index for dynamic paths --- frontend/Dockerfile | 1 + frontend/nginx.conf | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 frontend/nginx.conf diff --git a/frontend/Dockerfile b/frontend/Dockerfile index d90d622a8..b73d55605 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -17,6 +17,7 @@ RUN npm run build FROM nginx:alpine AS server COPY --from=build /app/build /usr/share/nginx/html +COPY nginx.conf /etc/nginx/conf.d/default.conf EXPOSE 80 diff --git a/frontend/nginx.conf b/frontend/nginx.conf new file mode 100644 index 000000000..f8dd2ce46 --- /dev/null +++ b/frontend/nginx.conf @@ -0,0 +1,19 @@ +server { + listen 80; + server_name _; + + root /usr/share/nginx/html; + index index.html; + + location / { + try_files $uri /index.html; + } + + location /static/ { + # Static files are served as-is + expires max; + access_log off; + } + + error_page 404 /index.html; +} \ No newline at end of file From 79c61b150b64c0f1ecd9f94ce40f27abaec05eb7 Mon Sep 17 00:00:00 2001 From: Siris <40269790+siriscmv@users.noreply.github.com> Date: Wed, 20 Nov 2024 13:04:25 -0500 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=9A=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/package.json b/frontend/package.json index 3e055f92b..825f7b156 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -46,6 +46,7 @@ "@types/node": "^22.9.1", "@types/react": "^18.3.12", "@types/react-autocomplete": "^1.8.11", - "prettier": "^3.3.3" + "prettier": "^3.3.3", + "typescript": "^5.6.3" } }