Skip to content

Commit

Permalink
chore: repo cleaning
Browse files Browse the repository at this point in the history
Signed-off-by: Promise <[email protected]>
  • Loading branch information
promise committed Dec 10, 2024
1 parent 46b426f commit c78824b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 216 deletions.
17 changes: 6 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,20 @@ WORKDIR /app
ENV IS_DOCKER=true


# base image for package installation
# install prod dependencies

FROM base AS dep-base
FROM base AS deps
RUN corepack enable pnpm

COPY package.json ./
COPY pnpm-lock.yaml ./


# install production dependencies

FROM dep-base AS prod-deps
RUN pnpm install --frozen-lockfile --prod


# install all dependencies and build typescript

FROM prod-deps AS ts-builder
FROM deps AS ts-builder
RUN pnpm install --frozen-lockfile

COPY tsconfig.json ./
Expand All @@ -33,12 +29,11 @@ RUN pnpm run build
# production image

FROM base
ENV NODE_ENV=production

COPY .env* ./
COPY --from=ts-builder /app/build ./build
COPY --from=prod-deps /app/node_modules ./node_modules
COPY package.json ./
COPY package.json .env* ./
COPY --from=ts-builder /app/build ./build

ENV NODE_ENV=production
ENTRYPOINT [ "npm", "run" ]
CMD [ "start" ]
4 changes: 0 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,9 @@
"dedent": "1.5.3",
"discord.js": "14.15.3",
"dotenv": "16.4.7",
"erlpack": "github:discord/erlpack",
"human-date": "1.4.0",
"match-sorter": "8.0.0",
"mongoose": "8.8.3",
"superagent": "10.1.1",
"utf-8-validate": "6.0.5",
"winston": "3.17.0",
"winston-daily-rotate-file": "5.0.0",
"zlib-sync": "0.1.9"
Expand All @@ -41,7 +38,6 @@
"@types/human-date": "1.4.5",
"@types/jest": "29.5.14",
"@types/node": "22.10.1",
"@types/superagent": "8.1.9",
"eslint": "9.16.0",
"eslint-config-promise": "github:promise/eslint-config",
"jest": "29.7.0",
Expand Down
Loading

0 comments on commit c78824b

Please sign in to comment.