File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change 1- FROM node:22 as build
1+ FROM node:22 AS build
22
33WORKDIR /app
44
@@ -18,15 +18,11 @@ WORKDIR /app
1818
1919ENV NODE_ENV=production
2020
21- # Copy source
22- COPY . .
21+ COPY package*.json ./
22+ RUN npm ci --omit=dev --legacy-peer-deps
2323
2424# Copy built files
2525COPY --from=build /app/dist .
2626
27- # Build and cleanup
28- ENV NODE_ENV=production
29- RUN npm ci --omit=dev --legacy-peer-deps
30-
3127# Start server
3228CMD ["node" , "node_modules/moleculer/bin/moleculer-runner.js" ]
Original file line number Diff line number Diff line change 55 "type" : " module" ,
66 "scripts" : {
77 "build" : " tsc --project tsconfig.build.json || cd ." ,
8- "postbuild" : " echo {\" type\" : \" commonjs\" } > dist/package.json" ,
8+ "postbuild" : " echo {\\\ " type\\\ " : \\\ " commonjs\\ \" } > dist/package.json" ,
99 "dev" : " tsx ./node_modules/moleculer/bin/moleculer-runner.js --config moleculer.config.ts --hot --repl services/**/*.service.ts" ,
1010 "start" : " moleculer-runner --config dist/moleculer.config.js" ,
1111 "cli" : " moleculer connect {{transporter}}" ,
You can’t perform that action at this time.
0 commit comments