Initial commit
This commit is contained in:
commit
5d4f3c0965
11 changed files with 194 additions and 0 deletions
20
Dockerfile
Normal file
20
Dockerfile
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# Build stage: full toolchain, compile TS -> dist/
|
||||
FROM node:22 AS build
|
||||
WORKDIR /app
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm ci
|
||||
COPY tsconfig.json ./
|
||||
COPY src ./src
|
||||
RUN npm run build
|
||||
|
||||
# Runtime stage: no dev deps (this service has zero runtime deps)
|
||||
FROM node:22-slim
|
||||
WORKDIR /app
|
||||
ENV NODE_ENV=production
|
||||
ARG GIT_SHA=dev
|
||||
ENV GIT_SHA=${GIT_SHA}
|
||||
COPY --from=build /app/dist ./dist
|
||||
COPY package.json ./
|
||||
USER node
|
||||
EXPOSE 3000
|
||||
CMD ["node", "dist/index.js"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue