mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
Fix bugs with deploying images
- Exclude resvg native modules - Copy resvg native mods into final image - ensure deps are correct for alpine
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# build the sapper app
|
||||
FROM node AS base
|
||||
FROM node:alpine AS base
|
||||
ENV PNPM_HOME="/pnpm"
|
||||
ENV PATH="$PNPM_HOME:$PATH"
|
||||
RUN corepack enable
|
||||
@@ -12,11 +12,13 @@ WORKDIR /app
|
||||
FROM base AS build
|
||||
ENV CI=1
|
||||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
|
||||
RUN mkdir ../node_modules
|
||||
RUN cp -Lr node_modules/.pnpm/@resvg+resvg-*@*/node_modules/* ../node_modules/
|
||||
# RUN cd packages/website; --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
|
||||
|
||||
RUN cd packages/website; pnpm run build
|
||||
|
||||
run cd packages/website; pnpm exec rollup -c server-rollup.config.mjs
|
||||
RUN cd packages/website; pnpm exec rollup -c server-rollup.config.mjs
|
||||
# copy node_modules/ and other build files over
|
||||
FROM node:alpine
|
||||
|
||||
@@ -26,6 +28,7 @@ COPY --from=build /app/packages/website/output .
|
||||
COPY --from=build /app/packages/website/build/client ./client/
|
||||
COPY --from=build /app/packages/website/build/prerendered ./prerendered/
|
||||
COPY --from=build /app/packages/website/package.json ./package.json
|
||||
COPY --from=build /node_modules ./node_modules/
|
||||
|
||||
ENV NODE_ENV production
|
||||
EXPOSE 3000
|
||||
|
||||
Reference in New Issue
Block a user