mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 08:03:30 +01:00
* chore: move proxy-container to apps * chore: limit next/react rules to next apps * chore: add standalone issue template --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
33 lines
803 B
Docker
33 lines
803 B
Docker
FROM node:24-alpine AS base
|
|
|
|
ENV PNPM_HOME="/pnpm"
|
|
ENV PATH="$PNPM_HOME:$PATH"
|
|
|
|
COPY . /usr/proxy-container
|
|
WORKDIR /usr/proxy-container
|
|
|
|
RUN npm --global install corepack@latest
|
|
RUN corepack enable
|
|
RUN corepack install
|
|
|
|
FROM base AS builder
|
|
|
|
RUN pnpm --filter='@discordjs/proxy-container...' install --frozen-lockfile --ignore-scripts
|
|
RUN pnpm exec turbo run build --filter='@discordjs/proxy-container...' --output-logs=full
|
|
|
|
FROM builder AS pruned
|
|
|
|
RUN pnpm --filter='@discordjs/proxy-container' --prod deploy --legacy pruned
|
|
|
|
FROM node:24-alpine AS proxy
|
|
|
|
WORKDIR /usr/proxy-container
|
|
|
|
RUN addgroup --system --gid 1001 nodejs
|
|
RUN adduser --system --uid 1001 proxy-container
|
|
USER proxy-container
|
|
|
|
COPY --from=pruned /usr/proxy-container/pruned .
|
|
|
|
CMD ["node", "--enable-source-maps", "dist/index.js"]
|