diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 6dd635c..ae36e6e 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -53,6 +53,9 @@ RUN npm run build -w frontend FROM nginx:1.27-alpine AS prod COPY --from=build /app/frontend/dist /usr/share/nginx/html +# Bake the reverse-proxy config in so the image works standalone; compose may +# override it with a mount for easier edits. +COPY nginx/nginx.conf /etc/nginx/nginx.conf EXPOSE 80 diff --git a/render.yaml b/render.yaml index 054539c..f263614 100644 --- a/render.yaml +++ b/render.yaml @@ -3,18 +3,18 @@ services: name: workorders-api runtime: node plan: free - buildCommand: npm ci && npm run build -w @workorders/shared && npm run build -w backend + buildCommand: NODE_ENV=development npm ci && npm run build -w @workorders/shared && npm run build -w backend startCommand: node backend/dist/server.js - healthCheckPath: /health + healthCheckPath: /ready envVars: - key: NODE_ENV value: production - key: TRUST_PROXY_HOPS value: "2" - key: CORS_ORIGIN - value: https://workorders-desk.vercel.app + value: https://workorder.lverma.com - key: APP_URL - value: https://workorders-desk.vercel.app + value: https://workorder.lverma.com # sync: false → values are entered in the Render dashboard at create time - key: MONGODB_URI sync: false @@ -22,3 +22,7 @@ services: sync: false - key: COOKIE_SECRET sync: false + - key: RESEND_API_KEY + sync: false + - key: RESEND_FROM + value: Work Order Desk diff --git a/vercel.json b/vercel.json index c1b6249..930ce46 100644 --- a/vercel.json +++ b/vercel.json @@ -1,7 +1,7 @@ { "$schema": "https://openapi.vercel.sh/vercel.json", "framework": "vite", - "installCommand": "npm install", + "installCommand": "npm ci", "buildCommand": "npm run build -w @workorders/shared && npm run build -w frontend", "outputDirectory": "frontend/dist", "rewrites": [