Skip to content

Commit 0eb4560

Browse files
committed
Optimizes build process for web application
Removes redundant node installation steps from the API Dockerfile, improving build times and reducing image size. Sets node options in the app-publish Dockerfile to allocate more memory during the build process, preventing out-of-memory errors. Removes setting node options from the client build script, using the environment variable instead.
1 parent 0f45dfd commit 0eb4560

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@ ENTRYPOINT [ "dotnet", "Exceptionless.Job.dll" ]
4848
FROM build AS api-publish
4949
WORKDIR /app/src/Exceptionless.Web
5050

51-
RUN apt-get update -yq
52-
RUN curl -sL https://deb.nodesource.com/setup_22.x | bash - && apt-get install -yq nodejs
53-
5451
RUN dotnet publish -c Release -o out /p:SkipSpaPublish=true
5552

5653
# api
@@ -66,6 +63,7 @@ ENTRYPOINT [ "dotnet", "Exceptionless.Web.dll" ]
6663
# app-publish
6764

6865
FROM build AS app-publish
66+
ENV NODE_OPTIONS=--max_old_space_size=8192
6967
WORKDIR /app/src/Exceptionless.Web
7068

7169
RUN apt-get update -yq

src/Exceptionless.Web/ClientApp/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"scripts": {
66
"dev": "cross-env NODE_OPTIONS=--trace-warnings vite dev",
77
"dev:api": "cross-env ASPNETCORE_URLS=https://be.exceptionless.io/ vite dev",
8-
"build": "cross-env NODE_OPTIONS=--max-old-space-size=8192 vite build",
8+
"build": "vite build",
99
"preview": "vite preview",
1010
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
1111
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",

0 commit comments

Comments
 (0)