Files
aiworker-backend/Dockerfile
Hector Ros be4bdf7cbe
Some checks failed
Build and Push Backend / build (push) Failing after 2m34s
Add CI/CD: Dockerfile + Gitea Actions workflow
- Multi-stage Dockerfile with Bun 1.3.6
- Gitea Actions workflow for auto-build
- Push to git.fuq.tv container registry
- Build cache optimization

Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
2026-01-19 22:48:13 +01:00

24 lines
570 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.lockb /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" ]