Skip to content
Merged
Show file tree
Hide file tree
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
1,816 changes: 1,816 additions & 0 deletions build-log/2025-10-20-paul.md

Large diffs are not rendered by default.

729 changes: 0 additions & 729 deletions build-log/20251020-paul.md

This file was deleted.

12 changes: 12 additions & 0 deletions packages/api/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
node_modules
.env
.env.local
.env.*.local
dist
*.log
.DS_Store
coverage
.vscode
.idea
*.test.ts
*.spec.ts
__tests__
__mocks__

# SQLite dev database
*.db
*.db-journal

# Documentation (keep README)
*.md
!README.md
56 changes: 56 additions & 0 deletions packages/api/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Build stage
FROM node:20-alpine AS builder

WORKDIR /app

# Copy package files
COPY package*.json ./
COPY prisma ./prisma/

# Install dependencies
RUN npm ci

# Copy source code
COPY . .

# Generate Prisma Client
RUN npx prisma generate

# Build TypeScript
RUN npm run build

# Production stage
FROM node:20-alpine AS production

WORKDIR /app

# Install production dependencies only
COPY package*.json ./
COPY prisma ./prisma/

RUN npm ci --omit=dev && \
npm cache clean --force

# Copy built application from builder
COPY --from=builder /app/dist ./dist

# Copy scripts directory
COPY scripts ./scripts

# Copy entrypoint script
COPY docker-entrypoint.sh ./
RUN chmod +x docker-entrypoint.sh

# Generate Prisma Client in production
RUN npx prisma generate

# Create non-root user
RUN addgroup -g 1001 -S nodejs && \
adduser -S nodejs -u 1001

USER nodejs

EXPOSE 3000

ENTRYPOINT ["./docker-entrypoint.sh"]
CMD ["node", "dist/index.js"]
Loading