CodeIssuesDiscussionsWikiPull RequestsProjectsCommitsActionsReleasesContributorsPulse● GatesSecuritySettingsDeploymentsPipelineInsightsAgents✨ Explain✨ Ask AI✨ Workspace✨ Spec✨ Tests▓ Debt Map✨ NL Search🏛 Archaeology
Blame · Line-by-line history
Dockerfile
Each line is annotated with the commit that last touched it. Click any SHA to jump to that commit and see the surrounding change.
| e883329 | 1 | # ---- build stage ---- |
| 2 | FROM oven/bun:1 AS builder | |
| 3 | ||
| 4 | WORKDIR /app | |
| 5 | ||
| 6 | # Copy lockfile and manifest first for layer caching | |
| 7 | COPY package.json bun.lock ./ | |
| 8 | ||
| 9 | # Install production dependencies only | |
| 10 | RUN bun install --frozen-lockfile --production | |
| 11 | ||
| 12 | # ---- production stage ---- | |
| 13 | # oven/bun:1-debian is based on Debian so apt is available | |
| 14 | FROM oven/bun:1-debian AS runner | |
| 15 | ||
| 16 | WORKDIR /app | |
| 17 | ||
| 18 | # Install git (required for git CLI subprocess calls) | |
| 19 | RUN apt-get update \ | |
| 20 | && apt-get install -y --no-install-recommends git \ | |
| 21 | && rm -rf /var/lib/apt/lists/* | |
| 22 | ||
| 23 | # Copy production node_modules from builder | |
| 24 | COPY --from=builder /app/node_modules ./node_modules | |
| 25 | ||
| 26 | # Copy application source and migration files | |
| 27 | COPY src/ ./src/ | |
| 28 | COPY drizzle/ ./drizzle/ | |
| 29 | COPY package.json ./ | |
| 30 | ||
| 31 | # Create the repos directory and give ownership to the bun user | |
| 32 | RUN mkdir -p /app/repos \ | |
| 33 | && chown -R bun:bun /app | |
| 34 | ||
| 35 | # Run as non-root user (provided by the base image) | |
| 36 | USER bun | |
| 37 | ||
| 38 | # Default environment variables | |
| 39 | ENV GIT_REPOS_PATH=/app/repos \ | |
| 40 | PORT=3000 \ | |
| 41 | NODE_ENV=production | |
| 42 | ||
| 43 | EXPOSE 3000 | |
| 44 | ||
| 45 | CMD ["bun", "run", "src/index.ts"] |