Something went wrong. Try again.
Mirror — see github.com/blacksky-algorithms/blacksky.community
Something went wrong. Try again.
blacksky.community Dockerfile.bskylink
1.3 kB · 45 lines
at main
12345678910111213141516171819202122232425262728293031323334353637383940414243444546FROM node:24.22.1-alpine3.23 AS build
# Move files into the image and installWORKDIR /app
RUN corepack enable
COPY ./bskylink/package.json ./COPY ./bskylink/pnpm-lock.yaml ./bskylink/pnpm-workspace.yaml ./RUN pnpm install --frozen-lockfile
COPY ./bskylink/tsconfig.json ./COPY ./bskylink/src ./srcCOPY ./bskylink/locales ./locales
# build then prune dev depsRUN pnpm buildRUN pnpm install --prod --frozen-lockfile --ignore-scripts --prefer-offline
# Uses assets from build stage to reduce build sizeFROM node:24.22.1-alpine3.23
RUN apk add --update dumb-init
# Avoid zombie processes, handle signal forwardingENTRYPOINT ["dumb-init", "--"]
WORKDIR /appCOPY --from=build /app /appRUN mkdir /app/data && chown node /app/data
VOLUME /app/dataEXPOSE 3000 9090ENV LINK_PORT=3000ENV LINK_METRICS_PORT=9090ENV NODE_ENV=productionENV NODE_OPTIONS="--import=@atproto-labs/fetch-node/emudhra-preload"
# https://github.com/nodejs/docker-node/blob/master/docs/BestPractices.md#non-root-userUSER nodeCMD ["node", "--heapsnapshot-signal=SIGUSR2", "--enable-source-maps", "dist/bin.js"]
LABEL org.opencontainers.image.source=https://github.com/bluesky-social/social-appLABEL org.opencontainers.image.description="Bsky Link Service"LABEL org.opencontainers.image.licenses=UNLICENSED