-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
41 lines (27 loc) · 792 Bytes
/
Dockerfile
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
# ? -------------------------
# ? Builder: Build dependencies like @discordjs/opus and everything
# ? -------------------------
FROM node:22-alpine AS builder
WORKDIR /app
RUN apk add --no-cache libc6-compat
RUN apk add --no-cache python3 make g++
COPY . ./
RUN corepack enable
RUN pnpm i --frozen-lockfile
ENV INTERNAL_SECRET=tempmockvalue
ENV JWT_SECRET=tempmockvalue
RUN pnpm build
# ? -------------------------
# ? Runner: Copy stuff from builder to save spaces from added apk packages
# ? -------------------------
FROM node:22-alpine AS runner
WORKDIR /app
RUN corepack enable
USER node
COPY --chown=node:node --from=builder /app .
# Install pnpm by invoking corepack
RUN pnpm --version
ENV NODE_ENV=production
ENV ENVIRONMENT=PRODUCTION
EXPOSE 7100
CMD ["pnpm", "start"]