mirror of
https://github.com/jeffusion/gitea-ai-assistant.git
synced 2026-03-27 10:05:50 +00:00
- 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
43 lines
777 B
Docker
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"]
|