Something went wrong. Try again.
A serverless AT Protocol lexicon authority
atproto lexicon
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233# syntax=docker/dockerfile:1
# The signing key never appears in this file. `dist/` is built beforehand, on a machine# that has the key, and enters the image as ordinary build context. See README.md.
FROM node:22-alpine AS depsWORKDIR /appCOPY package.json package-lock.json ./RUN npm ci --omit=dev --ignore-scripts
FROM gcr.io/distroless/nodejs22-debian12:nonroot AS runtimeWORKDIR /app
# Only corpora's serving subtree is copied. `src/serve` imports nothing and `src/node`# imports node: builtins only, so the runtime image contains zero third-party code — the# @atproto libraries that `npm ci` installed stay in the deps stage where they belong.COPY --from=deps /app/node_modules/corpora/package.json /app/node_modules/corpora/package.jsonCOPY --from=deps /app/node_modules/corpora/src/serve /app/node_modules/corpora/src/serveCOPY --from=deps /app/node_modules/corpora/src/node /app/node_modules/corpora/src/node
COPY package.json server.js healthcheck.js ./COPY dist/ ./dist/
ENV NODE_ENV=production PORT=2583 HOST=0.0.0.0EXPOSE 2583USER nonroot
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ CMD ["/nodejs/bin/node", "/app/healthcheck.js"]
CMD ["/app/server.js"]