-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[migrate] replace Crawler controller with idea2app/Web-file-cache ser…
…vice [optimize] update Upstream packages Signed-off-by: TechQuery <shiy2008@gmail.com>
- Loading branch information
Showing
12 changed files
with
340 additions
and
1,517 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,23 @@ | ||
# Reference: https://pnpm.io/docker#example-1-build-a-bundle-in-a-docker-container | ||
|
||
FROM ghcr.io/puppeteer/puppeteer:latest AS base | ||
USER root | ||
FROM node:20-slim AS base | ||
RUN apt-get update && \ | ||
apt-get install curl -y --no-install-recommends | ||
RUN mv ~/.cache/puppeteer/chrome /opt/chromium | ||
ENV PNPM_HOME="/pnpm" | ||
ENV PATH="$PNPM_HOME:$PATH" | ||
RUN corepack enable | ||
RUN mkdir /app | ||
COPY . /app | ||
WORKDIR /app | ||
COPY . . | ||
|
||
FROM base AS prod-deps | ||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm i --prod --frozen-lockfile | ||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm i -P --frozen-lockfile --ignore-scripts | ||
|
||
FROM base AS build | ||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm i --frozen-lockfile | ||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm i --frozen-lockfile | ||
RUN pnpm build | ||
|
||
FROM base | ||
COPY --from=prod-deps /app/node_modules /app/node_modules | ||
COPY --from=build /app/dist /app/dist | ||
|
||
COPY --from=prod-deps /app/node_modules ./node_modules | ||
COPY --from=build /app/dist ./dist | ||
EXPOSE 8080 | ||
CMD ["npm", "start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.