-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
47 lines (30 loc) · 1.52 KB
/
Dockerfile
File metadata and controls
47 lines (30 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
FROM node:24-bookworm-slim AS deps
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm pkg delete scripts.prepare \
&& npm ci --omit=dev --legacy-peer-deps \
&& npm cache clean --force
FROM node:24-bookworm-slim AS runtime-base
LABEL org.opencontainers.image.title="webhook-debugger-logger" \
org.opencontainers.image.licenses="ISC"
ENV NODE_ENV=production \
ACTOR_WEB_SERVER_PORT=8080 \
APIFY_LOCAL_STORAGE_DIR=/app/storage
WORKDIR /app
RUN mkdir -p /app/storage/key_value_stores/default \
&& chown -R node:node /app
COPY --from=deps --chown=node:node /app/node_modules ./node_modules
COPY --chown=node:node package.json ./
COPY --chown=node:node .actor ./.actor
COPY --chown=node:node public ./public
COPY --chown=node:node src ./src
USER node
EXPOSE 8080
HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 CMD ["node", "-e", "const port = process.env.ACTOR_WEB_SERVER_PORT || 8080; fetch(`http://127.0.0.1:${port}/ready`).then((response) => process.exit(response.ok ? 0 : 1)).catch(() => process.exit(1));"]
CMD ["node", "src/main.js"]
FROM runtime-base AS runtime-standalone
LABEL org.opencontainers.image.description="Self-hosted container image for Webhook Debugger & Logger"
# Keep the Apify publication target on the same runtime lineage as deps/runtime-base
# so native modules such as DuckDB stay API-compatible between install and runtime.
FROM runtime-base AS runtime-apify
LABEL org.opencontainers.image.description="Apify publication image for Webhook Debugger & Logger"