-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
26 lines (22 loc) · 800 Bytes
/
Copy pathDockerfile
File metadata and controls
26 lines (22 loc) · 800 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
FROM node:20.20.2-bookworm
ENV NODE_ENV=production \
PYTHONDONTWRITEBYTECODE=1 \
RESOUND_OUTPUT_DIR=/data/transcripts \
RESOUND_DISCORD_PYTHON=/usr/bin/python3
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates git libopus0 python3 python3-pip \
&& rm -rf /var/lib/apt/lists/* \
&& corepack enable \
&& corepack prepare pnpm@9.15.0 --activate
WORKDIR /app
COPY . .
RUN pnpm install --frozen-lockfile --prod=false
RUN python3 -m pip install --break-system-packages --no-cache-dir -r packages/audio/python/requirements.txt
RUN pnpm clean \
&& pnpm build \
&& pnpm prune --prod \
&& mkdir -p /data/transcripts \
&& chown -R node:node /app /data
USER node
VOLUME ["/data/transcripts"]
CMD ["node", "apps/bot/dist/index.js"]