Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ea8bd46973 |
@@ -41,8 +41,10 @@ COPY . .
|
||||
# Build application
|
||||
RUN pnpm build
|
||||
|
||||
# Transpile migrations for production runner
|
||||
RUN pnpm exec tsc migrations/*.ts --outDir migrations_built --module esnext --target esnext --moduleResolution node --esModuleInterop --skipLibCheck || true
|
||||
# Transpile migrations to JS for production compatibility (ESM requires extensions)
|
||||
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
|
||||
FROM node:20-alpine AS runner
|
||||
|
||||
Reference in New Issue
Block a user