Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adds healthcheck to dockerfile #180

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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", "--"]
Expand All @@ -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"
Expand Down