mirror of
https://github.com/Ninluc/Dat_Boi.git
synced 2025-08-07 08:56:14 +02:00
Fix docker
All checks were successful
Dat_Boi upload to portainer / Deploy (push) Successful in 2m53s
All checks were successful
Dat_Boi upload to portainer / Deploy (push) Successful in 2m53s
This commit is contained in:
12
Dockerfile
12
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 . .
|
||||
|
@ -14,6 +14,7 @@ services:
|
||||
environment:
|
||||
NODE_ENV: production
|
||||
DISCORD_TOKEN: ${DISCORD_TOKEN}
|
||||
OPENAI_TOKEN: ${OPENAI_TOKEN}
|
||||
restart: unless-stopped
|
||||
pull_policy: build
|
||||
|
||||
|
Reference in New Issue
Block a user