- Remove node_modules, dist, .next from git tracking - Add .next and *.tsbuildinfo to .gitignore - Remove Iranian mirrors from Dockerfiles (arvancloud.ir) - Add npm ci step for dependency installation - Ready for VPN-based internet access workflow
25 lines
660 B
Docker
25 lines
660 B
Docker
FROM node:22-alpine AS app-builder
|
|
RUN apk add --no-cache openssl
|
|
WORKDIR /app
|
|
COPY frontend/application/package*.json ./
|
|
RUN 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 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
|
|
EXPOSE 8080
|
|
CMD ["nginx", "-g", "daemon off;"]
|