Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM node:20-alpine AS builder
FROM node:22-alpine AS builder
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
RUN npm run build

FROM node:20-alpine AS runner
FROM node:22-alpine AS runner
RUN addgroup --system --gid 1001 nodejs && \
adduser --system --uid 1001 finaflow
WORKDIR /app
Expand All @@ -14,9 +14,10 @@ COPY --from=builder /app/dist ./dist
COPY --from=builder /app/db/migrations ./db/migrations
COPY --from=builder /app/package.json ./
COPY --from=builder /app/drizzle.config.ts drizzle.config.ts
COPY --from=builder /app/scripts/run-migrations.ts scripts/run-migrations.ts
USER finaflow

EXPOSE 3000
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:3000/health || exit 1
CMD ["node", "dist/boot.js"]
# HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
# CMD wget --no-verbose --tries=1 --spider http://localhost:3000/health || exit 1
CMD ["sh", "-c", "npx tsx scripts/run-migrations.ts && node dist/boot.js"]
Loading