26 lines
767 B
Docker
26 lines
767 B
Docker
FROM node:22-alpine AS app-builder
|
|
RUN apk add --no-cache openssl
|
|
WORKDIR /app
|
|
COPY frontend/application/package*.json ./
|
|
RUN npm config set registry http://registry.parsaaghayi.ir/repository/npm-proxy/ && npm ci
|
|
COPY frontend/application ./
|
|
RUN npm run build
|
|
|
|
FROM node:22-alpine AS admin-builder
|
|
RUN apk add --no-cache openssl
|
|
WORKDIR /app
|
|
COPY frontend/admin-panel/package*.json ./
|
|
RUN npm config set registry http://registry.parsaaghayi.ir/repository/npm-proxy/ && npm ci
|
|
COPY frontend/admin-panel ./
|
|
RUN npm run build
|
|
|
|
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 ["sh", "-c", "nginx && npm start"]
|