diff --git a/Dockerfile b/Dockerfile index 6633d9c7..5fb05827 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,6 +14,8 @@ COPY --chown=node:node . . # Set NODE_ENV environment variable ENV NODE_ENV production +# If you get `Allocation failed`, lower this https://nodejs.org/api/cli.html#cli_max_old_space_size_size_in_megabytes +ENV NODE_OPTIONS --max-old-space-size=8192 # Run the build command which creates the production bundle RUN yarn run build diff --git a/frontend/Dockerfile b/frontend/Dockerfile index dd1f53ec..193bb987 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -16,6 +16,9 @@ RUN npm install COPY . . COPY .env.docker .env +# If you get `Allocation failed`, lower this https://nodejs.org/api/cli.html#cli_max_old_space_size_size_in_megabytes +ENV NODE_OPTIONS --max-old-space-size=8192 + # Building our application RUN npm run build diff --git a/widget/Dockerfile b/widget/Dockerfile index 0ef17ca0..9aeba72e 100644 --- a/widget/Dockerfile +++ b/widget/Dockerfile @@ -15,6 +15,9 @@ RUN npm install # Copying all the files in our project COPY . . +# If you get `Allocation failed`, lower this https://nodejs.org/api/cli.html#cli_max_old_space_size_size_in_megabytes +ENV NODE_OPTIONS --max-old-space-size=8192 + # Building our application RUN npm run build