Files
archived-gitea-ai-assistant/Dockerfile
jeffusion c0fe893997 ci: rewrite CI/CD with semantic-release and GHCR Docker push
- Rewrite release.yml: semantic-release for auto-versioning + Docker
  image build and push to GitHub Container Registry (ghcr.io)
- Rewrite ci.yml: remove continue-on-error on lint
- Add .releaserc.json with changelog and git plugins
- Add semantic-release dependencies to package.json
- Fix Dockerfile: remove --frozen-lockfile from production install
- Update .dockerignore with comprehensive exclusions
- Update docker-compose.yml to pull from GHCR by default
- Remove obsolete pnpm packageManager field
- Remove obsolete kubernetes.yaml from .gitignore
2026-03-03 18:33:55 +08:00

43 lines
777 B
Docker

# ---- Stage 1: Frontend Builder ----
FROM oven/bun:1 AS frontend-builder
WORKDIR /app/frontend
COPY frontend/package.json frontend/bun.lock* ./
RUN bun install --frozen-lockfile
COPY frontend/ .
RUN bun run build
# ---- Stage 2: Backend Builder ----
FROM oven/bun:1 AS backend-builder
WORKDIR /app
COPY package.json bun.lock* ./
RUN bun install --production
COPY src ./src
COPY tsconfig.json .
# ---- Stage 3: Production ----
FROM oven/bun:1-slim
WORKDIR /app
COPY --from=backend-builder /app/node_modules ./node_modules
COPY --from=backend-builder /app/src ./src
COPY --from=backend-builder /app/package.json .
COPY --from=backend-builder /app/tsconfig.json .
COPY --from=frontend-builder /app/frontend/dist ./public
EXPOSE 3000
CMD ["bun", "run", "start"]