feat: add Dockerfile and entrypoint script for containerized application
Some checks failed
Build Docker Image / build (push) Failing after 33s

This commit is contained in:
2026-03-08 15:37:59 +01:00
parent efeea1ae19
commit 05b29a62bb
3 changed files with 107 additions and 0 deletions

28
Dockerfile Normal file
View File

@@ -0,0 +1,28 @@
FROM node:24-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM node:24-alpine AS runner
WORKDIR /app
ENV NODE_ENV=production
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/build ./build
COPY --from=builder /app/drizzle ./drizzle
# TODO: Need to generate schema outside of src during build to avoid copying all of src
COPY --from=builder /app/src ./src
COPY --from=builder /app/drizzle.config.ts ./
COPY --from=builder /app/package.json ./
COPY docker-entrypoint.sh /app/docker-entrypoint.sh
RUN chmod +x /app/docker-entrypoint.sh
EXPOSE 3000
ENTRYPOINT ["/app/docker-entrypoint.sh"]