diff --git a/Dockerfile b/Dockerfile index 855ccf9..5c4aeaf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:20.11-alpine3.18 as build +FROM node:20.11-alpine3.18 AS build RUN npm install -g pnpm @@ -10,7 +10,7 @@ RUN pnpm install --production --frozen-lockfile > /dev/null # Uses assets from build stage to reduce build size FROM node:20.11-alpine3.18 -RUN apk add --update dumb-init +RUN apk add --update dumb-init curl # Avoid zombie processes, handle signal forwarding ENTRYPOINT ["dumb-init", "--"] @@ -25,6 +25,7 @@ ENV NODE_ENV=production ENV UV_USE_IO_URING=0 CMD ["node", "--enable-source-maps", "index.js"] +HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 CMD curl localhost:${PDS_PORT}/xrpc/_health || exit 1 LABEL org.opencontainers.image.source=https://github.com/bluesky-social/pds LABEL org.opencontainers.image.description="AT Protocol PDS"