This commit is contained in:
1 parent
f4dea1f1b0
commit
a5b1b31ef8
6 files changed
+18
-28
No files matched your search
+10
-9
@@ -2,7 +2,7 @@ FROM node:22-alpine AS app-builder
|
||||
RUN apk add --no-cache openssl
|
||||
WORKDIR /app
|
||||
COPY frontend/application/package*.json ./
|
||||
RUN npm ci
|
||||
RUN npm config set registry http://registry.parsaaghayi.ir/repository/npm-proxy/ && npm ci
|
||||
COPY frontend/application ./
|
||||
RUN npm run build
|
||||
|
||||
@@ -10,15 +10,16 @@ FROM node:22-alpine AS admin-builder
|
||||
RUN apk add --no-cache openssl
|
||||
WORKDIR /app
|
||||
COPY frontend/admin-panel/package*.json ./
|
||||
RUN npm ci
|
||||
RUN npm config set registry http://registry.parsaaghayi.ir/repository/npm-proxy/ && npm ci
|
||||
COPY frontend/admin-panel ./
|
||||
RUN npm run build
|
||||
|
||||
FROM nginxinc/nginx-unprivileged:alpine
|
||||
WORKDIR /usr/share/nginx/html
|
||||
COPY --from=app-builder /app/.next ./.next
|
||||
COPY --from=app-builder /app/public ./public
|
||||
COPY --from=admin-builder /app/dist ./admin
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
FROM node:22-alpine
|
||||
RUN apk add --no-cache nginx
|
||||
WORKDIR /app
|
||||
COPY --from=app-builder /app .
|
||||
COPY --from=admin-builder /app/dist ./admin_static
|
||||
COPY nginx.conf /etc/nginx/http.d/default.conf
|
||||
|
||||
EXPOSE 8080
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
CMD ["sh", "-c", "nginx && npm start"]
|
||||
Reference in new issue
Block a user