Container images and Woodpecker CI pipeline
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
c197e5978a
commit
52d8e0f7e0
@@ -0,0 +1,26 @@
|
||||
# Build context: repository root.
|
||||
FROM node:22-alpine AS build
|
||||
RUN corepack enable
|
||||
WORKDIR /repo
|
||||
COPY pnpm-lock.yaml pnpm-workspace.yaml package.json tsconfig.base.json ./
|
||||
COPY shared ./shared
|
||||
COPY server-be ./server-be
|
||||
# Only the workspace packages needed by server-be (the other ones are not copied).
|
||||
RUN pnpm install --frozen-lockfile --filter @cardy/server-be...
|
||||
RUN pnpm --filter @cardy/server-be build \
|
||||
&& pnpm --filter @cardy/server-be --prod deploy --legacy /out
|
||||
|
||||
FROM node:22-alpine
|
||||
ENV NODE_ENV=production \
|
||||
DATA_DIR=/data \
|
||||
HOST=0.0.0.0 \
|
||||
PORT=10002
|
||||
WORKDIR /app
|
||||
COPY --from=build /out/package.json ./package.json
|
||||
COPY --from=build /out/node_modules ./node_modules
|
||||
COPY --from=build /out/dist ./dist
|
||||
RUN mkdir -p /data && chown node:node /data
|
||||
USER node
|
||||
VOLUME /data
|
||||
EXPOSE 10002
|
||||
CMD ["node", "dist/index.js"]
|
||||
Reference in New Issue
Block a user