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
|
||||
COPY --from=builder /app/ .
|
||||
RUN pnpm deploy --filter="@edr/passenger-api" --legacy /deploy
|
||||
# Copy prisma directory and generate client in deploy location
|
||||
RUN cp -r apps/edr-passenger-api/prisma /deploy/ && \
|
||||
cd /deploy && \
|
||||
npx prisma generate --schema=prisma/schema.prisma
|
||||
RUN if [ -d node_modules/.prisma ]; then \
|
||||
mkdir -p /deploy/node_modules && \
|
||||
cp -r node_modules/.prisma /deploy/node_modules/.prisma; \
|
||||
fi
|
||||
|
||||
# --- 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.
|
||||
@@ -37,10 +37,7 @@ WORKDIR /deploy
|
||||
RUN corepack enable && corepack prepare pnpm@11.1.1 --activate
|
||||
ENV CI=true
|
||||
ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0
|
||||
# Copy the resolution script
|
||||
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"]
|
||||
CMD ["sh", "-c", "npm run prisma:generate && npm run prisma:migrate && npm run prisma:seed"]
|
||||
|
||||
FROM node:24.15.0-alpine AS runner
|
||||
RUN apk add --no-cache libc6-compat
|
||||
|
||||
Reference in New Issue
Block a user