added toml

This commit is contained in:
JBB0807 2025-04-21 10:15:29 -07:00
parent e1eba0c210
commit c3efa45873
2 changed files with 20 additions and 12 deletions

View file

@ -7,8 +7,8 @@ FROM node:${NODE_VERSION}-slim AS base
# Set the working directory
WORKDIR /app
# Copy package.json and package-lock.json for dependency installation
COPY --link package.json package-lock.json ./
COPY . .
RUN npm install
# Install dependencies using npm ci for deterministic builds
RUN --mount=type=cache,target=/root/.npm npm ci --production
@ -16,14 +16,6 @@ RUN --mount=type=cache,target=/root/.npm npm ci --production
# Copy the application source code
COPY --link . .
# Set environment variables for production
ENV NODE_ENV=production
ENV NODE_OPTIONS="--max-old-space-size=4096"
# Create a non-root user and switch to it
RUN useradd -m appuser
USER appuser
# Expose the application port
EXPOSE 8080