fix(backend): fix dist output structure and runtime entrypoint in Dockerfile
All checks were successful
Deploy Canina / deploy (push) Successful in 32s
All checks were successful
Deploy Canina / deploy (push) Successful in 32s
This commit is contained in:
parent
fd5eb9dd1d
commit
f1b77f3fba
@ -15,7 +15,7 @@ RUN if [ -n "$NPM_REGISTRY" ]; then \
|
||||
COPY package*.json ./
|
||||
RUN npm ci --prefer-offline --no-audit
|
||||
COPY . .
|
||||
RUN https_proxy=http://172.17.0.1:8888 http_proxy=http://172.17.0.1:8888 ./node_modules/.bin/prisma generate && npm run build
|
||||
RUN rm -rf dist && https_proxy=http://172.17.0.1:8888 http_proxy=http://172.17.0.1:8888 ./node_modules/.bin/prisma generate && npm run build
|
||||
|
||||
FROM node:20-alpine
|
||||
USER root
|
||||
@ -31,4 +31,4 @@ COPY --chown=node:node --from=builder /app/prisma/tsconfig.seed.json ./prisma/ts
|
||||
COPY --chown=node:node --from=builder /app/prisma/scientificTerms.ts ./prisma/scientificTerms.ts
|
||||
EXPOSE 3000
|
||||
USER node
|
||||
CMD ["sh", "-c", "npx prisma migrate deploy && node dist/main"]
|
||||
CMD ["sh", "-c", "npx prisma migrate deploy && if [ -f dist/src/main.js ]; then node dist/src/main.js; else node dist/main.js; fi"]
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
"target": "ES2023",
|
||||
"sourceMap": true,
|
||||
"outDir": "./dist",
|
||||
"rootDir": "./src",
|
||||
"baseUrl": "./",
|
||||
"incremental": true,
|
||||
"skipLibCheck": true,
|
||||
@ -21,5 +22,7 @@
|
||||
"noImplicitAny": true,
|
||||
"strictBindCallApply": true,
|
||||
"noFallthroughCasesInSwitch": true
|
||||
}
|
||||
},
|
||||
"include": ["src/**/*"],
|
||||
"exclude": ["node_modules", "dist", "scripts", "prisma", "**/*.spec.ts"]
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user