chore: add Docker config for Dokploy deploy

This commit is contained in:
2026-06-02 23:43:19 -03:00
parent 8a9ce7ae04
commit 0e089155da
4 changed files with 58 additions and 0 deletions

21
Dockerfile Normal file
View File

@@ -0,0 +1,21 @@
# Stage 1: build
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
# Variables de entorno inyectadas como build args desde Dokploy
ARG VITE_SUPABASE_URL
ARG VITE_SUPABASE_ANON_KEY
ENV VITE_SUPABASE_URL=$VITE_SUPABASE_URL
ENV VITE_SUPABASE_ANON_KEY=$VITE_SUPABASE_ANON_KEY
RUN npm run build
# Stage 2: serve
FROM nginx:alpine
COPY --from=builder /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]