Skip to content

Commit

Permalink
Docker healthcheck (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdellabitta authored Jan 4, 2025
1 parent 1d290dc commit b75cc4a
Show file tree
Hide file tree
Showing 4 changed files with 265 additions and 152 deletions.
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM node:jod-alpine

FROM node:22-slim
RUN apt update \
&& apt --no-install-recommends install -y curl \
&& apt clean
WORKDIR /opt/thumbnail-api
COPY src /opt/thumbnail-api/src
COPY package.json /opt/thumbnail-api
Expand All @@ -9,6 +11,7 @@ COPY eslint.config.mjs /opt/thumbnail-api
RUN chown -R node:node /opt/thumbnail-api
USER node
EXPOSE 3000
HEALTHCHECK CMD ["curl", "-f", "http://localhost:3000/health"]
RUN npm run clean \
&& npm ci --ignore-scripts \
&& npm run build
Expand Down
Loading

0 comments on commit b75cc4a

Please sign in to comment.