updates on the docker and nginx and dockerignore fiels for the deploumenets i the dokploy

This commit is contained in:
sriram
2026-08-11 19:33:58 +05:30
parent 3765e666bc
commit ac41e1cd65
3 changed files with 67 additions and 0 deletions

23
Dockerfile Normal file
View File

@@ -0,0 +1,23 @@
# ---- Build stage ----
FROM node:20-alpine AS build
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
# VITE_API_BASE_URL is intentionally left unset: nginx.conf proxies /api/*
# to the backend container, so the built app can keep using relative
# same-origin requests (see src/api/client.js).
RUN npm run build
# ---- Serve stage ----
FROM nginx:alpine
WORKDIR /usr/share/nginx/html
RUN rm -rf ./*
COPY --from=build /app/dist/ .
COPY nginx.conf /etc/nginx/nginx.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]