From a65715ca63f142841fdf11992cfa1c1fd29f2faf Mon Sep 17 00:00:00 2001 From: Albert Byiringiro <88356155+albert-byiringiro@users.noreply.github.com> Date: Thu, 19 Dec 2024 22:02:59 +0200 Subject: [PATCH] improve render.yaml --- render.yaml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/render.yaml b/render.yaml index da31ee2..071ea6f 100644 --- a/render.yaml +++ b/render.yaml @@ -13,8 +13,8 @@ services: region: frankfurt branch: main buildCommand: > - npm install && cd shared && npm install && npm run build && cd ../server && - npm install -g @nestjs/cli && npm install && + npm install && cd shared && npm install && npm run build && cd ../server && + npm install -g @nestjs/cli && npm install && npm run build -- --path tsconfig.build.json startCommand: cd server && NODE_PATH=../shared/dist node dist/main envVars: @@ -34,8 +34,6 @@ services: type: redis name: votefusion-redis property: port - - key: TS_NODE_BASEURL - value: ./dist - type: web name: votefusion-client @@ -44,15 +42,13 @@ services: region: frankfurt branch: main buildCommand: > - npm ci && cd shared && npm install && npm run build && cd ../client && - npm install --save-dev @types/react-transition-group @types/react @types/react-dom && - npm install vite @vitejs/plugin-react && - SKIP_PREFLIGHT_CHECK=true npm run build - startCommand: cd client && npm run serve + npm ci && cd shared && npm run build && cd ../client && + npm run build + publishDirectory: dist envVars: - key: VITE_API_URL value: https://votefusion-api.onrender.com - key: PORT value: 10000 - key: NODE_ENV - value: development \ No newline at end of file + value: production