Skip to content

Commit

Permalink
build the frontend in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
fuziontech committed Jun 3, 2024
1 parent c0f9524 commit 2ecf22e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -167,4 +167,5 @@ housewatch.sqlite3
.DS_Store
yarn.lock

charts/housewatch/charts/
charts/housewatch/charts/
.pnpm/
4 changes: 2 additions & 2 deletions charts/housewatch/templates/nginx-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ data:
}
location /admin {
proxy_pass http://housewatch-api:8000;
proxy_pass http://{{ include "housewatch.fullname" . }}-api:8000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
}
location /healthz {
proxy_pass http://housewatch-api:8000;
proxy_pass http://{{ include "housewatch.fullname" . }}-api:8000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
Expand Down
4 changes: 3 additions & 1 deletion frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
FROM alpine:latest
FROM node:lts-alpine3.20

WORKDIR /frontend

RUN pnpm i && vite build

COPY build/ build/

CMD ["echo", "Serve the files from /frontend/build, don't run this container directly"]
2 changes: 1 addition & 1 deletion frontend/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default defineConfig({
},
},
},
base: process.env.NODE_ENV === "production" ? "/webapp/" : "/",
base: "/",
build: {
outDir: "./build"
}
Expand Down

0 comments on commit 2ecf22e

Please sign in to comment.