Fixed machine-learning container cannot start prod

This commit is contained in:
Alex 2022-08-20 22:26:47 -07:00
parent 1e29ff322d
commit 3dc538f9e6
No known key found for this signature in database
GPG key ID: 53CD082B3A5E1082
2 changed files with 7 additions and 6 deletions

View file

@ -28,14 +28,14 @@ WORKDIR /usr/src/app
COPY package.json package-lock.json ./
RUN mkdir -p /usr/src/app/dist \
&& mkdir -p /usr/src/app/node_modules \
&& apt-get update \
&& apt-get install -y ffmpeg \
&& rm -rf /var/cache/apt/lists
&& mkdir -p /usr/src/app/node_modules \
&& apt-get update \
&& apt-get install -y ffmpeg \
&& rm -rf /var/cache/apt/lists
COPY --from=builder /usr/src/app/node_modules ./node_modules
COPY --from=builder /usr/src/app/dist ./dist
RUN npm prune --production
CMD [ "node", "dist/main" ]
# CMD [ "node", "dist/main" ]

View file

@ -1,2 +1,3 @@
# npm run typeorm migration:run
npm run build && npm run start:prod
# npm run start:prod
node /dist/main.js