Fix attempt on media url #13
@@ -1,4 +1,5 @@
|
|||||||
FROM node:22-slim AS base
|
# syntax=docker/dockerfile:1
|
||||||
|
FROM node:22-alpine AS base
|
||||||
ENV PNPM_HOME="/pnpm"
|
ENV PNPM_HOME="/pnpm"
|
||||||
ENV PATH="$PNPM_HOME:$PATH"
|
ENV PATH="$PNPM_HOME:$PATH"
|
||||||
RUN corepack enable && corepack prepare pnpm@latest --activate
|
RUN corepack enable && corepack prepare pnpm@latest --activate
|
||||||
@@ -9,10 +10,17 @@ COPY pnpm-lock.yaml pnpm-workspace.yaml package.json ./
|
|||||||
COPY backend/package.json ./backend/
|
COPY backend/package.json ./backend/
|
||||||
COPY frontend/package.json ./frontend/
|
COPY frontend/package.json ./frontend/
|
||||||
COPY documentation/package.json ./documentation/
|
COPY documentation/package.json ./documentation/
|
||||||
RUN pnpm install --no-frozen-lockfile
|
|
||||||
|
# Utilisation du cache pour pnpm et installation figée
|
||||||
|
RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
|
||||||
|
pnpm install --frozen-lockfile
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
# On réinstalle après COPY pour s'assurer que tous les scripts de cycle de vie et les liens sont corrects
|
|
||||||
RUN pnpm install --no-frozen-lockfile
|
# Deuxième passe avec cache pour les scripts/liens
|
||||||
|
RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
|
||||||
|
pnpm install --frozen-lockfile
|
||||||
|
|
||||||
RUN pnpm run --filter @memegoat/backend build
|
RUN pnpm run --filter @memegoat/backend build
|
||||||
RUN pnpm deploy --filter=@memegoat/backend --prod --legacy /app
|
RUN pnpm deploy --filter=@memegoat/backend --prod --legacy /app
|
||||||
RUN cp -r backend/dist /app/dist
|
RUN cp -r backend/dist /app/dist
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# syntax=docker.io/docker/dockerfile:1
|
# syntax=docker/dockerfile:1
|
||||||
|
|
||||||
FROM node:22-alpine AS base
|
FROM node:22-alpine AS base
|
||||||
ENV PNPM_HOME="/pnpm"
|
ENV PNPM_HOME="/pnpm"
|
||||||
@@ -11,11 +11,20 @@ COPY pnpm-lock.yaml pnpm-workspace.yaml package.json ./
|
|||||||
COPY backend/package.json ./backend/
|
COPY backend/package.json ./backend/
|
||||||
COPY frontend/package.json ./frontend/
|
COPY frontend/package.json ./frontend/
|
||||||
COPY documentation/package.json ./documentation/
|
COPY documentation/package.json ./documentation/
|
||||||
RUN pnpm install --no-frozen-lockfile
|
|
||||||
|
# Montage du cache pnpm
|
||||||
|
RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
|
||||||
|
pnpm install --frozen-lockfile
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
# On réinstalle après COPY pour s'assurer que tous les scripts de cycle de vie et les liens sont corrects
|
|
||||||
RUN pnpm install --no-frozen-lockfile
|
# Deuxième passe avec cache pour les scripts/liens
|
||||||
RUN pnpm run --filter @memegoat/documentation build
|
RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
|
||||||
|
pnpm install --frozen-lockfile
|
||||||
|
|
||||||
|
# Build avec cache Next.js
|
||||||
|
RUN --mount=type=cache,id=next-docs-cache,target=/usr/src/app/documentation/.next/cache \
|
||||||
|
pnpm run --filter @memegoat/documentation build
|
||||||
|
|
||||||
FROM node:22-alpine AS runner
|
FROM node:22-alpine AS runner
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# syntax=docker.io/docker/dockerfile:1
|
# syntax=docker/dockerfile:1
|
||||||
|
|
||||||
FROM node:22-alpine AS base
|
FROM node:22-alpine AS base
|
||||||
ENV PNPM_HOME="/pnpm"
|
ENV PNPM_HOME="/pnpm"
|
||||||
@@ -11,11 +11,20 @@ COPY pnpm-lock.yaml pnpm-workspace.yaml package.json ./
|
|||||||
COPY backend/package.json ./backend/
|
COPY backend/package.json ./backend/
|
||||||
COPY frontend/package.json ./frontend/
|
COPY frontend/package.json ./frontend/
|
||||||
COPY documentation/package.json ./documentation/
|
COPY documentation/package.json ./documentation/
|
||||||
RUN pnpm install --no-frozen-lockfile
|
|
||||||
|
# Montage du cache pnpm
|
||||||
|
RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
|
||||||
|
pnpm install --frozen-lockfile
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
# On réinstalle après COPY pour s'assurer que tous les scripts de cycle de vie et les liens sont corrects
|
|
||||||
RUN pnpm install --no-frozen-lockfile
|
# Deuxième passe avec cache pour les scripts/liens
|
||||||
RUN pnpm run --filter @memegoat/frontend build
|
RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
|
||||||
|
pnpm install --frozen-lockfile
|
||||||
|
|
||||||
|
# Build avec cache Next.js
|
||||||
|
RUN --mount=type=cache,id=next-cache,target=/usr/src/app/frontend/.next/cache \
|
||||||
|
pnpm run --filter @memegoat/frontend build
|
||||||
|
|
||||||
FROM node:22-alpine AS runner
|
FROM node:22-alpine AS runner
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|||||||
Reference in New Issue
Block a user