From 7ac123439ad3d06d7355399d7686d2acb9e0480b Mon Sep 17 00:00:00 2001 From: Kanchan Sapkota Date: Sun, 16 Jun 2024 03:43:53 -0400 Subject: [PATCH] Fix(CI): Update dockerfile add missing build command before preview --- frontend/Dockerfile | 5 +++++ frontend/src/api/client.js | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/Dockerfile b/frontend/Dockerfile index acc9090..0d667b2 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -13,8 +13,13 @@ RUN npm install # Copy the rest of the application code COPY . . + +# Build the files for preview +RUN npm run build + # Expose the port that Vite uses EXPOSE 8080 + # Start the application CMD ["npm", "run", "preview"] diff --git a/frontend/src/api/client.js b/frontend/src/api/client.js index 0682378..551f701 100644 --- a/frontend/src/api/client.js +++ b/frontend/src/api/client.js @@ -1,7 +1,7 @@ import pocketbaseEs from "pocketbase"; -const API_URL='http://127.0.0.1:8090' +const API_URL='http://0.0.0.0:8090' const client=new pocketbaseEs(API_URL);