canina/Dockerfile
DevOps a5b1b31ef8
Some checks failed
Deploy Canina / deploy (push) Failing after 1s
ci: trigger deploy after SSH config fix
2026-07-13 13:13:52 +00:00

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"]