mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
revert changes to dockerfile
This commit is contained in:
@@ -23,10 +23,10 @@ RUN pnpm turbo build --filter="@edr/passenger-api..."
|
|||||||
FROM base AS deployer
|
FROM base AS deployer
|
||||||
COPY --from=builder /app/ .
|
COPY --from=builder /app/ .
|
||||||
RUN pnpm deploy --filter="@edr/passenger-api" --legacy /deploy
|
RUN pnpm deploy --filter="@edr/passenger-api" --legacy /deploy
|
||||||
# Copy prisma directory and generate client in deploy location
|
RUN if [ -d node_modules/.prisma ]; then \
|
||||||
RUN cp -r apps/edr-passenger-api/prisma /deploy/ && \
|
mkdir -p /deploy/node_modules && \
|
||||||
cd /deploy && \
|
cp -r node_modules/.prisma /deploy/node_modules/.prisma; \
|
||||||
npx prisma generate --schema=prisma/schema.prisma
|
fi
|
||||||
|
|
||||||
# --- Migration image: built in CI, run as a one-shot `docker run --rm --env-file ...`
|
# --- Migration image: built in CI, run as a one-shot `docker run --rm --env-file ...`
|
||||||
# against the real DB, as its own gated step *before* the app image is built/deployed.
|
# against the real DB, as its own gated step *before* the app image is built/deployed.
|
||||||
@@ -37,10 +37,7 @@ WORKDIR /deploy
|
|||||||
RUN corepack enable && corepack prepare pnpm@11.1.1 --activate
|
RUN corepack enable && corepack prepare pnpm@11.1.1 --activate
|
||||||
ENV CI=true
|
ENV CI=true
|
||||||
ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0
|
ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0
|
||||||
# Copy the resolution script
|
CMD ["sh", "-c", "npm run prisma:generate && npm run prisma:migrate && npm run prisma:seed"]
|
||||||
COPY apps/edr-passenger-api/scripts/resolve-migrations.sh /deploy/scripts/
|
|
||||||
RUN chmod +x /deploy/scripts/resolve-migrations.sh
|
|
||||||
CMD ["sh", "-c", "/deploy/scripts/resolve-migrations.sh && npm run prisma:generate && npm run prisma:migrate && npm run prisma:seed"]
|
|
||||||
|
|
||||||
FROM node:24.15.0-alpine AS runner
|
FROM node:24.15.0-alpine AS runner
|
||||||
RUN apk add --no-cache libc6-compat
|
RUN apk add --no-cache libc6-compat
|
||||||
|
|||||||
Reference in New Issue
Block a user