Fix docker
All checks were successful
Dat_Boi upload to portainer / Deploy (push) Successful in 2m53s

This commit is contained in:
2025-07-05 19:44:07 +02:00
parent 90da9c78c5
commit 11020e0e87
2 changed files with 11 additions and 2 deletions

View File

@ -19,6 +19,14 @@ ENV NODE_ENV production
WORKDIR /usr/src/app
# Install python for dependencies that require it.
RUN apk update && apk add \
python3 \
make \
g++ \
ffmpeg \
curl
# Download dependencies as a separate step to take advantage of Docker's caching.
# Leverage a cache mount to /root/.npm to speed up subsequent builds.
# Leverage a bind mounts to package.json and package-lock.json to avoid having to copy them into
@ -27,9 +35,9 @@ RUN --mount=type=bind,source=package.json,target=package.json \
--mount=type=bind,source=package-lock.json,target=package-lock.json \
--mount=type=cache,target=/root/.npm \
npm ci
# Run the application as a non-root user.
USER node
#USER node
# Copy the rest of the source files into the image.
COPY . .

View File

@ -14,6 +14,7 @@ services:
environment:
NODE_ENV: production
DISCORD_TOKEN: ${DISCORD_TOKEN}
OPENAI_TOKEN: ${OPENAI_TOKEN}
restart: unless-stopped
pull_policy: build