From 11020e0e87dc3e89966f54e5073c48ae7e325b7f Mon Sep 17 00:00:00 2001 From: Matthias Guillitte Date: Sat, 5 Jul 2025 19:44:07 +0200 Subject: [PATCH] Fix docker --- Dockerfile | 12 ++++++++++-- compose.yaml | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index e296df4..cb2466d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 . . diff --git a/compose.yaml b/compose.yaml index 0d7a05c..42a4ef4 100644 --- a/compose.yaml +++ b/compose.yaml @@ -14,6 +14,7 @@ services: environment: NODE_ENV: production DISCORD_TOKEN: ${DISCORD_TOKEN} + OPENAI_TOKEN: ${OPENAI_TOKEN} restart: unless-stopped pull_policy: build