File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 11node_modules
2+ .git
3+ .github
4+ .vscode
25dist
36build
47.env
Original file line number Diff line number Diff line change @@ -36,6 +36,10 @@ RUN apk add --no-cache --update \
3636
3737FROM builder-${VARIANT} AS builder
3838
39+ # Set environment variables
40+ ENV NPM_CONFIG_LOGLEVEL=error \
41+ VITE_BUILD_ENV=production
42+
3943# Set the working directory
4044WORKDIR /app
4145
@@ -56,7 +60,6 @@ RUN rm -rf src/routes/\(docs\) && \
5660 chmod -R 750 uploads database
5761
5862# Build the application and remove `devDependencies`
59- ENV VITE_BUILD_ENV=production
6063RUN npm run build && \
6164 npm prune --omit=dev
6265
@@ -84,7 +87,10 @@ ARG PORT=3000 \
8487 USERNAME=node
8588
8689# Set environment variables
87- ENV NODE_ENV=production \
90+ ENV HEALTHCHECK_PORT=$PORT \
91+ HEALTHCHECK_PATH= \
92+ NODE_ENV=production \
93+ NPM_CONFIG_LOGLEVEL=error \
8894 PORT=$PORT \
8995 TZ=Etc/UTC
9096
@@ -121,7 +127,7 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone &
121127EXPOSE $PORT
122128
123129HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
124- CMD wget --method=HEAD -- quiet --spider http://localhost:$PORT || exit 1
130+ CMD wget --quiet --spider http://localhost:$HEALTHCHECK_PORT$HEALTHCHECK_PATH || exit 1
125131
126132# Use a non-root user (recommended for security)
127133USER $USERNAME
You can’t perform that action at this time.
0 commit comments