I have a simple project, Nest.js + Docker + Graphql, all works perfectly when I run it locally. But when I tried to run it in the docker, I caught this error.
FROM node:latest
WORKDIR /
COPY package.json /
RUN npm install
COPY . /
EXPOSE 3000
RUN npm run build
CMD npm run start:prod
When I run image without graphql, everything works well in the docker
my dependencies:
"@nestjs/common": "^7.1.1",
"@nestjs/config": "^0.5.0",
"@nestjs/core": "^7.1.1",
"@nestjs/graphql": "^7.3.11",
"@nestjs/platform-express": "^7.1.1",
"@nestjs/typeorm": "^7.1.0",
"apollo-server-express": "^2.14.0",
"bcryptjs": "^2.4.3",
"class-transformer": "^0.2.3",
"class-validator": "^0.12.2",
"graphql": "^15.0.0",
"graphql-tools": "^6.0.3",
"jsonwebtoken": "^8.5.1",
"pg": "^8.1.0",
"reflect-metadata": "^0.1.13",
"rimraf": "^3.0.2",
"rxjs": "^6.5.4",
"typeorm": "^0.2.24"
when I ran my code first time, I caught the error
I added {"allowSyntheticDefaultImports": true} in my tsconfig and it is solved this problem
I already tried to start my project in docker with --max-old-space-size=8192, but it is not helping me .
I started "docker stats" and just watched how container destroyed memory!
Could you please help me?
