Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ea8bd46973 |
@@ -41,8 +41,10 @@ COPY . .
|
|||||||
# Build application
|
# Build application
|
||||||
RUN pnpm build
|
RUN pnpm build
|
||||||
|
|
||||||
# Transpile migrations for production runner
|
# Transpile migrations to JS for production compatibility (ESM requires extensions)
|
||||||
RUN pnpm exec tsc migrations/*.ts --outDir migrations_built --module esnext --target esnext --moduleResolution node --esModuleInterop --skipLibCheck || true
|
RUN npx tsc migrations/*.ts --outDir migrations --module esnext --target esnext --moduleResolution node --esModuleInterop --skipLibCheck || true && \
|
||||||
|
sed -i 's/from "\.\/\([^"]*\)";/from ".\/\1.js";/g' migrations/index.js && \
|
||||||
|
rm migrations/*.ts
|
||||||
|
|
||||||
# Stage 2: Runner
|
# Stage 2: Runner
|
||||||
FROM node:20-alpine AS runner
|
FROM node:20-alpine AS runner
|
||||||
|
|||||||
Reference in New Issue
Block a user