wetalk/Dockerfile
ordinarthur 3a719c5aea
Some checks failed
Build & Deploy / build-and-deploy (push) Failing after 14s
fix: remove tsc -b from Dockerfile, let Vite handle TS compilation
Vite uses esbuild for TypeScript and resolves the @/ path alias via
vite.config.ts. Standalone tsc cannot resolve @/ without baseUrl/paths
which are deprecated in TS7. Dropping tsc from the build is the clean fix.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-12 12:03:25 +02:00

16 lines
425 B
Docker

FROM node:22-alpine AS build
WORKDIR /app
COPY package*.json .npmrc ./
RUN npm ci
COPY . .
ARG VITE_SUPABASE_URL
ARG VITE_SUPABASE_ANON_KEY
RUN ./node_modules/.bin/vite build
FROM nginx:alpine
COPY --from=build /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
HEALTHCHECK --interval=30s --timeout=3s CMD wget -q --spider http://localhost/ || exit 1
CMD ["nginx", "-g", "daemon off;"]