inflatehq/Dockerfile
chris 27589ab99f Initial commit: InflateHQ — Square to CalDAV approval app
Ingests Square invoices/payments, extracts event scheduling from order
notes, and pushes approved entries to a CalDAV calendar after human
review.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-21 15:19:05 -04:00

36 lines
1.0 KiB
Docker

# syntax=docker/dockerfile:1
# --- deps & build ---
# Using the full (non-slim) image because it already bundles OpenSSL, which
# Prisma's query engine is dynamically linked against.
FROM node:22-bookworm AS build
WORKDIR /app
COPY package.json package-lock.json* ./
COPY server/package.json server/package.json
COPY web/package.json web/package.json
RUN npm ci
COPY . .
RUN npm run prisma:generate
RUN npm run build:web
RUN npm run build:server
# --- runtime ---
FROM node:22-bookworm AS runtime
WORKDIR /app
ENV NODE_ENV=production
COPY --from=build /app/node_modules ./node_modules
COPY --from=build /app/package.json ./package.json
COPY --from=build /app/server/package.json ./server/package.json
COPY --from=build /app/server/dist ./server/dist
COPY --from=build /app/server/prisma ./server/prisma
COPY --from=build /app/web/dist ./web/dist
EXPOSE 3000
HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \
CMD node server/dist/healthcheck.js || exit 1
CMD ["node", "server/dist/entrypoint.js"]