fix(ci): stabilize Medusa dependency installation
Build and Push Medusa / Construir y publicar Medusa (push) Failing after 4m59s
Build and Push Medusa / Construir y publicar Medusa (push) Failing after 4m59s
This commit is contained in:
@@ -16,7 +16,7 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
name: Construir y publicar Medusa
|
name: Construir y publicar Medusa
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 30
|
timeout-minutes: 45
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout del código
|
- name: Checkout del código
|
||||||
|
|||||||
@@ -1,3 +1,20 @@
|
|||||||
fund=false
|
registry=https://registry.npmjs.org/
|
||||||
audit=false
|
replace-registry-host=always
|
||||||
|
|
||||||
|
package-lock=true
|
||||||
|
dry-run=false
|
||||||
|
global=false
|
||||||
|
|
||||||
legacy-peer-deps=true
|
legacy-peer-deps=true
|
||||||
|
|
||||||
|
audit=false
|
||||||
|
fund=false
|
||||||
|
update-notifier=false
|
||||||
|
|
||||||
|
fetch-retries=2
|
||||||
|
fetch-retry-mintimeout=5000
|
||||||
|
fetch-retry-maxtimeout=30000
|
||||||
|
fetch-timeout=120000
|
||||||
|
|
||||||
|
maxsockets=8
|
||||||
|
loglevel=info
|
||||||
|
|||||||
@@ -4,13 +4,18 @@ FROM node:22.18.0-bookworm-slim AS builder
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
ENV CI=true
|
ENV CI=true \
|
||||||
ENV NODE_ENV=development
|
NODE_ENV=development \
|
||||||
ENV NPM_CONFIG_UPDATE_NOTIFIER=false
|
NPM_CONFIG_UPDATE_NOTIFIER=false
|
||||||
|
|
||||||
COPY package.json .npmrc ./
|
COPY package.json package-lock.json .npmrc ./
|
||||||
RUN --mount=type=cache,target=/root/.npm,sharing=locked \
|
|
||||||
npm install --no-audit --no-fund
|
RUN --mount=type=cache,id=medusa-builder-npm,target=/root/.npm,sharing=private \
|
||||||
|
npm ci \
|
||||||
|
--legacy-peer-deps \
|
||||||
|
--prefer-offline \
|
||||||
|
--no-audit \
|
||||||
|
--no-fund
|
||||||
|
|
||||||
COPY tsconfig.json medusa-config.ts ./
|
COPY tsconfig.json medusa-config.ts ./
|
||||||
COPY src ./src
|
COPY src ./src
|
||||||
@@ -21,17 +26,25 @@ FROM node:22.18.0-bookworm-slim AS runtime
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production \
|
||||||
ENV PORT=9000
|
PORT=9000 \
|
||||||
ENV NPM_CONFIG_UPDATE_NOTIFIER=false
|
NPM_CONFIG_UPDATE_NOTIFIER=false
|
||||||
|
|
||||||
COPY --from=builder /app/.medusa/server/package.json ./
|
COPY --from=builder /app/.medusa/server/package.json ./
|
||||||
RUN --mount=type=cache,target=/root/.npm,sharing=locked \
|
COPY .npmrc ./
|
||||||
npm install --omit=dev --no-audit --no-fund
|
|
||||||
|
RUN --mount=type=cache,id=medusa-runtime-npm,target=/root/.npm,sharing=private \
|
||||||
|
npm install \
|
||||||
|
--omit=dev \
|
||||||
|
--legacy-peer-deps \
|
||||||
|
--prefer-offline \
|
||||||
|
--no-audit \
|
||||||
|
--no-fund
|
||||||
|
|
||||||
COPY --from=builder /app/.medusa/server ./
|
COPY --from=builder /app/.medusa/server ./
|
||||||
|
|
||||||
RUN chown -R node:node /app
|
RUN chown -R node:node /app
|
||||||
|
|
||||||
USER node
|
USER node
|
||||||
|
|
||||||
EXPOSE 9000
|
EXPOSE 9000
|
||||||
|
|||||||
+15141
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user