Merge pull request #64 from christianlouis/copilot/add-deployment-to-own-registry
Add dual-registry Docker deployment (GHCR + private registry)
This commit is contained in:
@@ -12,8 +12,8 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
REGISTRY: ghcr.io
|
GHCR_REGISTRY: ghcr.io
|
||||||
IMAGE_NAME: ${{ github.repository }}
|
PRIVATE_REGISTRY: registry.cklnet.com
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# ── Phase 1: Lint ──────────────────────────────────────────────────────
|
# ── Phase 1: Lint ──────────────────────────────────────────────────────
|
||||||
@@ -169,6 +169,14 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
packages: write
|
packages: write
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- context: ./backend
|
||||||
|
image_name: gmail-puller/backend
|
||||||
|
- context: ./frontend
|
||||||
|
image_name: gmail-puller/frontend
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -176,18 +184,28 @@ jobs:
|
|||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v4
|
uses: docker/setup-buildx-action@v4
|
||||||
|
|
||||||
- name: Log in to Container Registry
|
- name: Log in to GitHub Container Registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: ${{ env.REGISTRY }}
|
registry: ${{ env.GHCR_REGISTRY }}
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
# Requires PRIVATE_REGISTRY_USERNAME and PRIVATE_REGISTRY_PASSWORD secrets
|
||||||
|
- name: Log in to private registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: ${{ env.PRIVATE_REGISTRY }}
|
||||||
|
username: ${{ secrets.PRIVATE_REGISTRY_USERNAME }}
|
||||||
|
password: ${{ secrets.PRIVATE_REGISTRY_PASSWORD }}
|
||||||
|
|
||||||
- name: Extract metadata (tags, labels)
|
- name: Extract metadata (tags, labels)
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
images: |
|
||||||
|
${{ env.GHCR_REGISTRY }}/${{ github.repository_owner }}/${{ matrix.image_name }}
|
||||||
|
${{ env.PRIVATE_REGISTRY }}/${{ matrix.image_name }}
|
||||||
tags: |
|
tags: |
|
||||||
type=semver,pattern={{version}}
|
type=semver,pattern={{version}}
|
||||||
type=semver,pattern={{major}}.{{minor}}
|
type=semver,pattern={{major}}.{{minor}}
|
||||||
@@ -199,7 +217,7 @@ jobs:
|
|||||||
id: build-push
|
id: build-push
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
context: .
|
context: ${{ matrix.context }}
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- Upgraded `sqlalchemy` from `2.0.25` to `2.0.48` to fix `AssertionError: Class ... directly inherits TypingOnly but has additional attributes` on Python 3.14 (`__static_attributes__`, `__firstlineno__`)
|
- Upgraded `sqlalchemy` from `2.0.25` to `2.0.48` to fix `AssertionError: Class ... directly inherits TypingOnly but has additional attributes` on Python 3.14 (`__static_attributes__`, `__firstlineno__`)
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
- **Dual-registry Docker deployment**: CI now builds separate backend and frontend images and pushes to both GHCR (`ghcr.io`) and private registry (`registry.cklnet.com`) using a matrix strategy
|
||||||
- **Database-backed configuration**: `AppSetting` model and `ConfigService` for hybrid config (DB-first, env-var fallback)
|
- **Database-backed configuration**: `AppSetting` model and `ConfigService` for hybrid config (DB-first, env-var fallback)
|
||||||
- Admin API endpoints for managing settings (`GET/PUT/DELETE /api/v1/settings`)
|
- Admin API endpoints for managing settings (`GET/PUT/DELETE /api/v1/settings`)
|
||||||
- Default settings seeded into database on first startup (SMTP, processing, Gmail API, notifications)
|
- Default settings seeded into database on first startup (SMTP, processing, Gmail API, notifications)
|
||||||
|
|||||||
+1
-1
@@ -103,7 +103,7 @@ Comprehensive task breakdown for repository improvements and production readines
|
|||||||
- [ ] Set up Codecov integration
|
- [ ] Set up Codecov integration
|
||||||
|
|
||||||
### Not Started 📋
|
### Not Started 📋
|
||||||
- [ ] Add deployment workflow (staging/production)
|
- [x] Add deployment workflow (dual-registry: GHCR + private registry)
|
||||||
- [ ] Add release workflow with automated changelog
|
- [ ] Add release workflow with automated changelog
|
||||||
- [ ] Configure status checks for PRs
|
- [ ] Configure status checks for PRs
|
||||||
- [ ] Add performance regression detection
|
- [ ] Add performance regression detection
|
||||||
|
|||||||
Reference in New Issue
Block a user