90ac0b81d1
Add full V2 architecture: identity, content, studio (.NET 10) and file, render, notification, gateway (Go) services with vendored deps, plus DB migrations, event/API contracts, and an init-db script. Wire the Next.js frontend to the gateway: server-side JWT auth routes (login/register/refresh/logout/me), gateway fetch helper, and session/ cookie/jwt helpers under src/lib. Containerize the stack via docker-compose.v2.yml and per-service Dockerfiles. Base images resolve through a Nexus mirror (Docker Hub) and MCR directly; npm/NuGet pull from Nexus groups. Self-host fonts via next/font/local to avoid Google Fonts (geo-blocked). Add CI workflow and ignore .env.v2, *.stackdump, and .NET bin/obj. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
53 lines
1.9 KiB
YAML
53 lines
1.9 KiB
YAML
name: Build backend images
|
|
|
|
# Builds all 7 V2 microservice images with BuildKit + GitHub Actions layer cache.
|
|
# Cache is scoped per service, so each image only re-runs the steps that changed:
|
|
# - .NET services skip `dotnet restore` unless a .csproj changes
|
|
# - Go services skip nothing network-bound (deps are vendored) and reuse compile cache
|
|
on:
|
|
push:
|
|
branches: [master, main]
|
|
paths:
|
|
- "services/**"
|
|
- ".github/workflows/build.yml"
|
|
pull_request:
|
|
paths:
|
|
- "services/**"
|
|
- ".github/workflows/build.yml"
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
name: build ${{ matrix.service.name }}
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
service:
|
|
- { name: identity-svc, context: ./services/identity }
|
|
- { name: content-svc, context: ./services/content }
|
|
- { name: studio-svc, context: ./services/studio }
|
|
- { name: file-svc, context: ./services/file }
|
|
- { name: render-svc, context: ./services/render }
|
|
- { name: notification-svc, context: ./services/notification }
|
|
- { name: gateway, context: ./services/gateway }
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Build ${{ matrix.service.name }}
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: ${{ matrix.service.context }}
|
|
file: ${{ matrix.service.context }}/Dockerfile
|
|
push: false
|
|
load: false
|
|
# GitHub Actions cache backend — persists layers across CI runs.
|
|
# `scope` keeps each service's cache isolated so they don't evict each other.
|
|
cache-from: type=gha,scope=${{ matrix.service.name }}
|
|
cache-to: type=gha,scope=${{ matrix.service.name }},mode=max
|
|
tags: flatrender2-${{ matrix.service.name }}:ci
|