fix: VPN build, caching, Dockerfile fixes for Iran network
Deploy Canina / deploy (push) Failing after 12s
Deploy Canina / deploy (push) Failing after 12s
This commit is contained in:
1 parent
027f169830
commit
e4c196b080
5 files changed
+431
-107
No files matched your search
+16
-8
@@ -1,24 +1,32 @@
|
||||
FROM node:22-alpine AS app-builder
|
||||
RUN apk add --no-cache openssl
|
||||
FROM node:20-alpine AS app-builder
|
||||
WORKDIR /app
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
ENV NEXT_PUBLIC_API_URL=https://stageapi.canina.ir/api
|
||||
COPY frontend/application/package*.json ./
|
||||
RUN npm config set registry http://registry.parsaaghayi.ir/repository/npm-proxy/ && npm ci
|
||||
RUN npm ci --prefer-offline --no-audit
|
||||
COPY frontend/application ./
|
||||
RUN npm run build
|
||||
|
||||
FROM node:22-alpine AS admin-builder
|
||||
RUN apk add --no-cache openssl
|
||||
FROM node:20-alpine AS admin-builder
|
||||
WORKDIR /app
|
||||
ENV VITE_API_URL=https://stageapi.canina.ir/api
|
||||
COPY frontend/admin-panel/package*.json ./
|
||||
RUN npm config set registry http://registry.parsaaghayi.ir/repository/npm-proxy/ && npm ci
|
||||
RUN npm ci --prefer-offline --no-audit
|
||||
COPY frontend/admin-panel ./
|
||||
RUN npm run build
|
||||
|
||||
FROM node:22-alpine
|
||||
RUN apk add --no-cache nginx
|
||||
FROM node:20-alpine
|
||||
RUN addgroup -S nginx 2>/dev/null || true && adduser -S nginx -G nginx 2>/dev/null || true
|
||||
RUN mkdir -p /var/log/nginx /var/cache/nginx /run/nginx /etc/nginx/conf.d /etc/nginx/http.d
|
||||
COPY --from=nginx:alpine /etc/nginx /etc/nginx
|
||||
COPY --from=nginx:alpine /usr/sbin/nginx /usr/sbin/nginx
|
||||
COPY --from=nginx:alpine /usr/lib /usr/lib
|
||||
COPY --from=nginx:alpine /lib /lib
|
||||
RUN chown -R nginx:nginx /var/log/nginx /var/cache/nginx /run/nginx 2>/dev/null || true
|
||||
WORKDIR /app
|
||||
COPY --from=app-builder /app .
|
||||
COPY --from=admin-builder /app/dist ./admin_static
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
COPY nginx.conf /etc/nginx/http.d/default.conf
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
Reference in new issue
Block a user