Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work localy in docker, but not work in kubernetes #1028

Open
eduscrakozabrus opened this issue Jan 12, 2023 · 0 comments
Open

Work localy in docker, but not work in kubernetes #1028

eduscrakozabrus opened this issue Jan 12, 2023 · 0 comments

Comments

@eduscrakozabrus
Copy link

pod log
/usr/src/app/ncc/index.js:1
(()=>{var webpack_modules={96429:function(o,l,p){"use strict";var _= .................. (in one string all build)
Node.js v19.4.0

but in docker its work

Dockerfile

FROM node:19-alpine As build
WORKDIR /usr/src/app
RUN npm i -g @vercel/ncc
COPY package*.json ./
RUN npm ci
COPY . .
RUN NODE_ENV=production npm run build && npm run ncc

FROM node:19-alpine As production
ENV NODE_ENV production
WORKDIR /usr/src/app
RUN npm i -g @vercel/ncc
COPY package*.json ./
COPY --from=build /usr/src/app/ncc ./ncc

EXPOSE 5000
CMD ["ncc", "./ncc/index.js"]

app is NestJS 9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant