mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
ci: docker image build for proxy
This commit is contained in:
@@ -5,30 +5,10 @@ RUN apk add --no-cache libc6-compat
|
||||
|
||||
WORKDIR /usr/proxy
|
||||
|
||||
COPY . .
|
||||
RUN yarn dlx turbo prune --scope=@discordjs/proxy-container --docker
|
||||
COPY manifests .
|
||||
|
||||
FROM node:16-alpine AS installer
|
||||
|
||||
RUN apk update
|
||||
RUN apk add --no-cache libc6-compat
|
||||
|
||||
WORKDIR /usr/proxy
|
||||
|
||||
COPY .gitignore .gitignore
|
||||
COPY .yarn/ .yarn/
|
||||
COPY .yarnrc.yml .yarnrc.yml
|
||||
COPY --from=builder /usr/proxy/out/json/ .
|
||||
COPY --from=builder /usr/proxy/out/yarn.lock ./yarn.lock
|
||||
RUN yarn install
|
||||
|
||||
COPY --from=builder /usr/proxy/out/full/ .
|
||||
COPY tsup.config.ts tsup.config.ts
|
||||
COPY turbo.json turbo.json
|
||||
COPY tsconfig.json tsconfig.json
|
||||
RUN yarn dlx turbo run build --filter=@discordjs/proxy-container...
|
||||
|
||||
RUN yarn workspaces focus @discordjs/proxy-container --production
|
||||
RUN yarn install --immutable
|
||||
RUN rm -rf .yarn/cache
|
||||
|
||||
FROM node:16-alpine AS runner
|
||||
|
||||
@@ -39,5 +19,6 @@ RUN adduser --system --uid 1001 proxy
|
||||
USER proxy
|
||||
|
||||
COPY --from=installer /usr/proxy .
|
||||
COPY packs .
|
||||
|
||||
CMD ["node", "--enable-source-maps", "packages/proxy-container/dist/index.js"]
|
||||
CMD ["node", "--enable-source-maps", "dist/index.js"]
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
"lint": "prettier --check . && cross-env TIMING=1 eslint src --ext .mjs,.js,.ts --format=pretty",
|
||||
"format": "prettier --write . && cross-env TIMING=1 eslint src --ext .mjs,.js,.ts --fix --format=pretty",
|
||||
"fmt": "yarn format",
|
||||
"prepack": "yarn lint && yarn test && yarn build"
|
||||
"prepack": "yarn lint && yarn build"
|
||||
},
|
||||
"type": "module",
|
||||
"module": "./dist/index.js",
|
||||
@@ -48,7 +48,7 @@
|
||||
"tslib": "^2.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "16.18.20",
|
||||
"@types/node": "16.18.21",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.36.0",
|
||||
"eslint-config-neon": "^0.1.41",
|
||||
|
||||
Reference in New Issue
Block a user