feat: initial backend service template
Some checks failed
/ checks (push) Successful in 35s
/ deploy (push) Failing after 2s
Some checks failed
/ checks (push) Successful in 35s
/ deploy (push) Failing after 2s
This commit is contained in:
commit
2828a630a6
28 changed files with 6437 additions and 0 deletions
23
Dockerfile
Normal file
23
Dockerfile
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
# 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: production deps only (node-pg-migrate is a prod dep so
|
||||
# `npm run migrate` works inside this image for the PreSync Job).
|
||||
FROM node:22-slim
|
||||
WORKDIR /app
|
||||
ENV NODE_ENV=production
|
||||
ARG GIT_SHA=dev
|
||||
ENV GIT_SHA=${GIT_SHA}
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm ci --omit=dev
|
||||
COPY --from=build /app/dist ./dist
|
||||
COPY migrations ./migrations
|
||||
USER node
|
||||
EXPOSE 3000
|
||||
CMD ["node", "dist/bin/server.js"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue