CI CD 6
CI/CD / CI · API (dotnet build + test) (push) Successful in 44s
CI/CD / CI · Admin API (dotnet build) (push) Successful in 31s
CI/CD / CI · Dashboard (tsc) (push) Successful in 1m7s
CI/CD / CI · Admin Web (tsc) (push) Successful in 35s
CI/CD / CI · Website (tsc) (push) Successful in 44s
CI/CD / CI · Koja (tsc) (push) Successful in 48s
CI/CD / Deploy · all services (push) Failing after 59s
CI/CD / CI · API (dotnet build + test) (push) Successful in 44s
CI/CD / CI · Admin API (dotnet build) (push) Successful in 31s
CI/CD / CI · Dashboard (tsc) (push) Successful in 1m7s
CI/CD / CI · Admin Web (tsc) (push) Successful in 35s
CI/CD / CI · Website (tsc) (push) Successful in 44s
CI/CD / CI · Koja (tsc) (push) Successful in 48s
CI/CD / Deploy · all services (push) Failing after 59s
This commit is contained in:
@@ -1,27 +1,40 @@
|
||||
ARG NODE_IMAGE=mirror.soroushasadi.com/node:20-alpine
|
||||
|
||||
# ==================== DEPS STAGE ====================
|
||||
FROM ${NODE_IMAGE} AS deps
|
||||
WORKDIR /app
|
||||
|
||||
COPY web/admin/package*.json ./
|
||||
|
||||
ARG NPM_REGISTRY=https://mirror.soroushasadi.com/repository/npm-group/
|
||||
# Install deps then ensure Alpine (musl) SWC binary is present
|
||||
RUN npm install --legacy-peer-deps --ignore-scripts --registry ${NPM_REGISTRY} --strict-ssl=false \
|
||||
&& NEXT_VER=$(node -e "process.stdout.write(require('./node_modules/next/package.json').version)") \
|
||||
|
||||
RUN npm ci --legacy-peer-deps --ignore-scripts \
|
||||
--registry ${NPM_REGISTRY} \
|
||||
--strict-ssl=false \
|
||||
&& NEXT_VER=$(node -p "require('./node_modules/next/package.json').version") \
|
||||
&& ls node_modules/@next/swc-linux-x64-musl 2>/dev/null \
|
||||
|| npm install --no-save --ignore-scripts --registry ${NPM_REGISTRY} \
|
||||
|| npm install --no-save --ignore-scripts \
|
||||
--registry ${NPM_REGISTRY} \
|
||||
--strict-ssl=false \
|
||||
"@next/swc-linux-x64-musl@${NEXT_VER}"
|
||||
|
||||
|
||||
# ==================== BUILDER STAGE ====================
|
||||
FROM ${NODE_IMAGE} AS builder
|
||||
WORKDIR /app
|
||||
|
||||
ARG NEXT_PUBLIC_ADMIN_API_URL=http://localhost:5081
|
||||
|
||||
ENV NEXT_PUBLIC_ADMIN_API_URL=$NEXT_PUBLIC_ADMIN_API_URL
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY web/admin/ .
|
||||
|
||||
RUN npm run build
|
||||
|
||||
|
||||
# ==================== RUNNER STAGE ====================
|
||||
FROM ${NODE_IMAGE} AS runner
|
||||
WORKDIR /app
|
||||
|
||||
@@ -38,5 +51,6 @@ COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
|
||||
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
|
||||
|
||||
USER nextjs
|
||||
|
||||
EXPOSE 3000
|
||||
CMD ["node", "server.js"]
|
||||
+23
-3
@@ -1,22 +1,41 @@
|
||||
ARG NODE_IMAGE=mirror.soroushasadi.com/node:20-alpine
|
||||
|
||||
# ==================== DEPS STAGE ====================
|
||||
FROM ${NODE_IMAGE} AS deps
|
||||
WORKDIR /app
|
||||
COPY web/dashboard/package*.json ./
|
||||
ARG NPM_REGISTRY=https://mirror.soroushasadi.com/repository/npm-group/
|
||||
RUN npm install --legacy-peer-deps --ignore-scripts --registry ${NPM_REGISTRY} --strict-ssl=false
|
||||
|
||||
COPY web/dashboard/package*.json ./
|
||||
|
||||
ARG NPM_REGISTRY=https://mirror.soroushasadi.com/repository/npm-group/
|
||||
|
||||
# Use npm ci + ensure musl SWC binary (important on Alpine)
|
||||
RUN npm ci --legacy-peer-deps --ignore-scripts \
|
||||
--registry ${NPM_REGISTRY} \
|
||||
--strict-ssl=false \
|
||||
&& NEXT_VER=$(node -p "require('./node_modules/next/package.json').version") \
|
||||
&& ls node_modules/@next/swc-linux-x64-musl 2>/dev/null \
|
||||
|| npm install --no-save --ignore-scripts \
|
||||
--registry ${NPM_REGISTRY} \
|
||||
--strict-ssl=false \
|
||||
"@next/swc-linux-x64-musl@${NEXT_VER}"
|
||||
|
||||
|
||||
# ==================== BUILDER STAGE ====================
|
||||
FROM ${NODE_IMAGE} AS builder
|
||||
WORKDIR /app
|
||||
|
||||
ARG NEXT_PUBLIC_API_URL=http://localhost:5080
|
||||
|
||||
ENV NEXT_PUBLIC_API_URL=$NEXT_PUBLIC_API_URL
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY web/dashboard/ .
|
||||
|
||||
RUN npm run build
|
||||
|
||||
|
||||
# ==================== RUNNER STAGE ====================
|
||||
FROM ${NODE_IMAGE} AS runner
|
||||
WORKDIR /app
|
||||
|
||||
@@ -33,5 +52,6 @@ COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
|
||||
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
|
||||
|
||||
USER nextjs
|
||||
|
||||
EXPOSE 3000
|
||||
CMD ["node", "server.js"]
|
||||
@@ -1,29 +1,40 @@
|
||||
ARG NODE_IMAGE=mirror.soroushasadi.com/node:20-alpine
|
||||
|
||||
# ==================== DEPS STAGE ====================
|
||||
FROM ${NODE_IMAGE} AS deps
|
||||
WORKDIR /app
|
||||
|
||||
COPY web/website/package*.json ./
|
||||
|
||||
ARG NPM_REGISTRY=https://mirror.soroushasadi.com/repository/npm-group/
|
||||
# Install deps then ensure Alpine (musl) SWC binary is present
|
||||
RUN npm install --legacy-peer-deps --ignore-scripts --registry ${NPM_REGISTRY} --strict-ssl=false \
|
||||
&& NEXT_VER=$(node -e "process.stdout.write(require('./node_modules/next/package.json').version)") \
|
||||
|
||||
RUN npm ci --legacy-peer-deps --ignore-scripts \
|
||||
--registry ${NPM_REGISTRY} \
|
||||
--strict-ssl=false \
|
||||
&& NEXT_VER=$(node -p "require('./node_modules/next/package.json').version") \
|
||||
&& ls node_modules/@next/swc-linux-x64-musl 2>/dev/null \
|
||||
|| npm install --no-save --ignore-scripts --registry ${NPM_REGISTRY} --strict-ssl=false \
|
||||
|| npm install --no-save --ignore-scripts \
|
||||
--registry ${NPM_REGISTRY} \
|
||||
--strict-ssl=false \
|
||||
"@next/swc-linux-x64-musl@${NEXT_VER}"
|
||||
|
||||
# ==================== BUILDER STAGE ====================
|
||||
FROM ${NODE_IMAGE} AS builder
|
||||
WORKDIR /app
|
||||
|
||||
ARG MEEZI_API_URL=http://api:8080
|
||||
ENV MEEZI_API_URL=$MEEZI_API_URL
|
||||
ARG NEXT_PUBLIC_SITE_URL=http://localhost:3010
|
||||
|
||||
ENV MEEZI_API_URL=$MEEZI_API_URL
|
||||
ENV NEXT_PUBLIC_SITE_URL=$NEXT_PUBLIC_SITE_URL
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY web/website/ .
|
||||
|
||||
RUN npm run build
|
||||
|
||||
# ==================== RUNNER STAGE ====================
|
||||
FROM ${NODE_IMAGE} AS runner
|
||||
WORKDIR /app
|
||||
|
||||
@@ -41,5 +52,6 @@ COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
|
||||
COPY --from=builder /app/src/content ./src/content
|
||||
|
||||
USER nextjs
|
||||
|
||||
EXPOSE 3000
|
||||
CMD ["node", "server.js"]
|
||||
Reference in New Issue
Block a user