Files
aiworker-backend/Dockerfile
Hector Ros ebf5d74933
All checks were successful
Build and Push Backend / build (push) Successful in 41s
Fix Dockerfile: use bun.lock instead of bun.lockb
Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
2026-01-20 00:16:32 +01:00

24 lines
569 B
Docker

# AiWorker Backend - Docker Image
FROM oven/bun:1.3.6-alpine AS base
WORKDIR /app
# Install dependencies
FROM base AS install
RUN mkdir -p /temp/prod
COPY package.json bun.lock /temp/prod/
RUN cd /temp/prod && bun install --frozen-lockfile --production
# Copy source
FROM base AS release
COPY --from=install /temp/prod/node_modules node_modules
COPY . .
# Health check
HEALTHCHECK --interval=30s --timeout=3s --start-period=40s --retries=3 \
CMD bun fetch http://localhost:3000/api/health || exit 1
# Run
USER bun
EXPOSE 3000
ENTRYPOINT [ "bun", "src/index.ts" ]