-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
42 lines (29 loc) · 944 Bytes
/
Dockerfile
File metadata and controls
42 lines (29 loc) · 944 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
FROM node:22-slim as builder
# Set the working directory
WORKDIR /app
# Install dependencies
RUN apt-get update && apt-get install -y python3 make g++ libtool autoconf automake
RUN npm install -g pnpm
# Copy package.json
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
COPY prisma ./prisma/
# Install dependencies
RUN pnpm install --frozen-lockfile
# Copy the rest of the application code to the working directory
COPY . .
# Build the application
RUN pnpm run build
RUN pnpm prune --production
FROM node:22-slim
WORKDIR /app
# Install dependencies
RUN apt-get update && apt-get install -y ffmpeg
ENV NODE_ENV=production
COPY --from=builder /app/assets ./assets/
COPY --from=builder /app/dist ./dist/
COPY --from=builder /app/node_modules ./node_modules/
COPY --from=builder /app/package.json ./package.json
COPY --from=builder /app/prisma ./prisma/
COPY --from=builder /app/run.sh ./run.sh
# Start the bot
CMD ["./run.sh"]