fix(backend): Compile seed.ts to JS for production use
This commit is contained in:
parent
3aa0277ab7
commit
835c062c88
3 changed files with 3 additions and 6 deletions
|
|
@ -36,9 +36,6 @@ COPY --from=builder /app/node_modules ./node_modules
|
||||||
COPY --from=builder /app/prisma ./prisma
|
COPY --from=builder /app/prisma ./prisma
|
||||||
COPY --from=builder /app/package*.json ./
|
COPY --from=builder /app/package*.json ./
|
||||||
|
|
||||||
# Install ts-node for seed script
|
|
||||||
RUN npm install -g ts-node typescript
|
|
||||||
|
|
||||||
# Run as non-root
|
# Run as non-root
|
||||||
USER node
|
USER node
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
"seed:all": "npx prisma db seed && node prisma/seed-demo.js"
|
"seed:all": "npx prisma db seed && node prisma/seed-demo.js"
|
||||||
},
|
},
|
||||||
"prisma": {
|
"prisma": {
|
||||||
"seed": "ts-node prisma/seed.ts"
|
"seed": "node dist/prisma/seed.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fastify/cors": "^9.0.1",
|
"@fastify/cors": "^9.0.1",
|
||||||
|
|
|
||||||
|
|
@ -6,14 +6,14 @@
|
||||||
"ES2020"
|
"ES2020"
|
||||||
],
|
],
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"rootDir": "./src",
|
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"forceConsistentCasingInFileNames": true
|
"forceConsistentCasingInFileNames": true
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"src/**/*"
|
"src/**/*",
|
||||||
|
"prisma/**/*"
|
||||||
],
|
],
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"node_modules",
|
"node_modules",
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue