-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
26 lines (21 loc) · 808 Bytes
/
Copy pathDockerfile
File metadata and controls
26 lines (21 loc) · 808 Bytes
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
# OvenClear storefront — Cloud Run image.
#
# Runs the TypeScript sources directly through tsx rather than emitting a build:
# the module graph uses extensionless ESM imports that plain node cannot resolve,
# and a loader is both smaller and less to get wrong than a bundler step for a
# service this size.
FROM node:22-slim
ENV NODE_ENV=production
WORKDIR /app
# Dependencies first so a source-only change reuses this layer.
COPY package.json package-lock.json ./
RUN npm ci --omit=dev && npm cache clean --force
COPY tsconfig.json ./
COPY src ./src
COPY server ./server
COPY verify ./verify
# Cloud Run sends SIGTERM; node as PID 1 handles it (see the shutdown hook in
# server/index.ts). No shell wrapper, so the signal is not swallowed.
USER node
EXPOSE 8080
CMD ["npx", "tsx", "server/index.ts"]