updates on the docker and nginx and dockerignore fiels for the deploumenets i the dokploy
This commit is contained in:
23
Dockerfile
Normal file
23
Dockerfile
Normal 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;"]
|
||||
Reference in New Issue
Block a user