Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@ JWT_SECRET=changeme_generate_secure_secret_with_openssl_rand_hex_32
# Backend Configuration
# ============================================
# Database connection string
DATABASE_URL=sqlite:/data/finance.db
# For development with docker-compose.dev.yml, use:
DATABASE_URL=postgres://csf_user:csf_password@postgres:5432/csf_core
# For production with SQLite, use:
# DATABASE_URL=sqlite:/data/finance.db

# Rust logging level (trace, debug, info, warn, error)
RUST_LOG=info
RUST_LOG=debug

# Frontend URL for CORS (must match the actual frontend URL)
FRONTEND_URL=http://localhost:3000
Expand Down
46 changes: 23 additions & 23 deletions .github/workflows/docker-build-manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ on:
type: choice
options:
- both
- backend
- api-gateway
- frontend

permissions:
contents: read
packages: write

jobs:
build-backend:
name: Build Backend ${{ matrix.arch }}
build-api-gateway:
name: Build API Gateway ${{ matrix.arch }}
strategy:
matrix:
include:
Expand All @@ -33,7 +33,7 @@ jobs:
arch: arm64
runner: ubuntu-24.04-arm
runs-on: ${{ matrix.runner }}
if: inputs.build_target == 'both' || inputs.build_target == 'backend'
if: inputs.build_target == 'both' || inputs.build_target == 'api-gateway'
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -53,20 +53,20 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Backend Docker image by digest
- name: Build and push API Gateway Docker image by digest
id: build
uses: docker/build-push-action@v5
with:
context: ./backend
file: ./backend/Dockerfile
context: ./control-plane/api-gateway
file: ./control-plane/api-gateway/Dockerfile
push: true
outputs: type=registry,name=ghcr.io/${{ steps.repo.outputs.image_name }}-backend,push-by-digest=true
outputs: type=registry,name=ghcr.io/${{ steps.repo.outputs.image_name }}-api-gateway,push-by-digest=true
cache-from: |
type=gha,scope=backend-${{ matrix.arch }}
type=registry,ref=ghcr.io/${{ steps.repo.outputs.image_name }}-backend:buildcache-${{ matrix.arch }}
type=gha,scope=api-gateway-${{ matrix.arch }}
type=registry,ref=ghcr.io/${{ steps.repo.outputs.image_name }}-api-gateway:buildcache-${{ matrix.arch }}
cache-to: |
type=gha,mode=max,scope=backend-${{ matrix.arch }}
type=registry,ref=ghcr.io/${{ steps.repo.outputs.image_name }}-backend:buildcache-${{ matrix.arch }},mode=max
type=gha,mode=max,scope=api-gateway-${{ matrix.arch }}
type=registry,ref=ghcr.io/${{ steps.repo.outputs.image_name }}-api-gateway:buildcache-${{ matrix.arch }},mode=max
platforms: ${{ matrix.platform }}
provenance: false

Expand All @@ -79,22 +79,22 @@ jobs:
- name: Upload digest
uses: actions/upload-artifact@v4
with:
name: digests-backend-${{ matrix.arch }}
name: digests-api-gateway-${{ matrix.arch }}
path: /tmp/digests/*
if-no-files-found: error
retention-days: 1

merge-backend-manifest:
name: Create Backend Multi-Arch Manifest
merge-api-gateway-manifest:
name: Create API Gateway Multi-Arch Manifest
runs-on: ubuntu-latest
needs: [build-backend]
if: inputs.build_target == 'both' || inputs.build_target == 'backend'
needs: [build-api-gateway]
if: inputs.build_target == 'both' || inputs.build_target == 'api-gateway'
steps:
- name: Download digests
uses: actions/download-artifact@v4
with:
path: /tmp/digests
pattern: digests-backend-*
pattern: digests-api-gateway-*
merge-multiple: true

- name: Set up Docker Buildx
Expand All @@ -115,7 +115,7 @@ jobs:
- name: Create manifest list and push
working-directory: /tmp/digests
run: |
IMAGE_NAME="ghcr.io/${{ steps.repo.outputs.image_name }}-backend"
IMAGE_NAME="ghcr.io/${{ steps.repo.outputs.image_name }}-api-gateway"

docker buildx imagetools create \
-t ${IMAGE_NAME}:${{ inputs.version }} \
Expand All @@ -124,20 +124,20 @@ jobs:

- name: Inspect image
run: |
IMAGE_NAME="ghcr.io/${{ steps.repo.outputs.image_name }}-backend"
IMAGE_NAME="ghcr.io/${{ steps.repo.outputs.image_name }}-api-gateway"
docker buildx imagetools inspect ${IMAGE_NAME}:${{ inputs.version }}

- name: Summary
run: |
REPO_LOWER=$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')
echo "## 🐳 Backend Docker Image Built (Multi-Arch)" >> $GITHUB_STEP_SUMMARY
echo "## 🐳 API Gateway Docker Image Built (Multi-Arch)" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Platforms:** linux/amd64, linux/arm64" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Tags:**" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
echo "ghcr.io/${REPO_LOWER}-backend:${{ inputs.version }}" >> $GITHUB_STEP_SUMMARY
echo "ghcr.io/${REPO_LOWER}-backend:manual-latest" >> $GITHUB_STEP_SUMMARY
echo "ghcr.io/${REPO_LOWER}-api-gateway:${{ inputs.version }}" >> $GITHUB_STEP_SUMMARY
echo "ghcr.io/${REPO_LOWER}-api-gateway:manual-latest" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY

build-frontend:
Expand Down
38 changes: 19 additions & 19 deletions .github/workflows/main-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:
uses: ./.github/workflows/release.yml
secrets: inherit

# Step 2: Build Backend Docker Images (Parallel by Architecture)
build-backend-docker:
name: Build Backend ${{ matrix.arch }}
# Step 2: Build API Gateway Docker Images (Parallel by Architecture)
build-api-gateway-docker:
name: Build API Gateway ${{ matrix.arch }}
strategy:
matrix:
include:
Expand Down Expand Up @@ -66,22 +66,22 @@ jobs:
run: |
VERSION="${{ needs.release.outputs.new_release_version }}"
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Building backend version: $VERSION for ${{ matrix.arch }}"
echo "Building api-gateway version: $VERSION for ${{ matrix.arch }}"

- name: Build and push Backend Docker image by digest
- name: Build and push API Gateway Docker image by digest
id: build
uses: docker/build-push-action@v5
with:
context: ./backend
file: ./backend/Dockerfile
context: ./control-plane/api-gateway
file: ./control-plane/api-gateway/Dockerfile
push: true
outputs: type=registry,name=ghcr.io/${{ steps.repo.outputs.image_name }}-backend,push-by-digest=true
outputs: type=registry,name=ghcr.io/${{ steps.repo.outputs.image_name }}-api-gateway,push-by-digest=true
cache-from: |
type=gha,scope=backend-${{ matrix.arch }}
type=registry,ref=ghcr.io/${{ steps.repo.outputs.image_name }}-backend:buildcache-${{ matrix.arch }}
type=gha,scope=api-gateway-${{ matrix.arch }}
type=registry,ref=ghcr.io/${{ steps.repo.outputs.image_name }}-api-gateway:buildcache-${{ matrix.arch }}
cache-to: |
type=gha,mode=max,scope=backend-${{ matrix.arch }}
type=registry,ref=ghcr.io/${{ steps.repo.outputs.image_name }}-backend:buildcache-${{ matrix.arch }},mode=max
type=gha,mode=max,scope=api-gateway-${{ matrix.arch }}
type=registry,ref=ghcr.io/${{ steps.repo.outputs.image_name }}-api-gateway:buildcache-${{ matrix.arch }},mode=max
platforms: ${{ matrix.platform }}
provenance: false

Expand All @@ -94,16 +94,16 @@ jobs:
- name: Upload digest
uses: actions/upload-artifact@v4
with:
name: digests-backend-${{ matrix.arch }}
name: digests-api-gateway-${{ matrix.arch }}
path: /tmp/digests/*
if-no-files-found: error
retention-days: 1

# Step 3: Create Backend Multi-Arch Manifest
merge-backend-manifest:
name: Create Backend Multi-Arch Manifest
# Step 3: Create API Gateway Multi-Arch Manifest
merge-api-gateway-manifest:
name: Create API Gateway Multi-Arch Manifest
runs-on: ubuntu-latest
needs: [build-backend-docker, release]
needs: [build-api-gateway-docker, release]
permissions:
contents: read
packages: write
Expand All @@ -112,7 +112,7 @@ jobs:
uses: actions/download-artifact@v4
with:
path: /tmp/digests
pattern: digests-backend-*
pattern: digests-api-gateway-*
merge-multiple: true

- name: Set up Docker Buildx
Expand Down Expand Up @@ -200,7 +200,7 @@ jobs:
summary:
name: Pipeline Summary
runs-on: ubuntu-latest
needs: [release, build-backend-docker, build-frontend-docker]
needs: [release, build-api-gateway-docker, build-frontend-docker]
if: always()
steps:
- name: Generate Summary
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ jobs:
# Check if a release was published
if grep -q "Published release" semantic-release-output.log; then
echo "new_release_published=true" >> $GITHUB_OUTPUT
# Extract full version from the log (including beta, alpha, rc tags)
VERSION=$(grep "Published release" semantic-release-output.log | sed -n 's/.*Published release \([0-9.]*\(-[a-zA-Z0-9.]*\)\?\).*/\1/p')
# Extract version from the log
VERSION=$(grep "Published release" semantic-release-output.log | sed -n 's/.*Published release \([0-9.]*\).*/\1/p')
echo "new_release_version=$VERSION" >> $GITHUB_OUTPUT
echo "✅ New release published: $VERSION"
else
Expand Down
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ devenv.local.nix

finance.db

/backend/db/
/backend/target/

# Agent test directories
/agent/test-agent*/
/agent/test-p2p/
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,7 @@ All notable changes to CSF-Core will be documented in this file.

* dashboard not working only test ([cfe6edb](https://github.com/CS-Foundry/CSF-Core/commit/cfe6edb108d5b48f144122e06160211fd9b06a61))

>>>>>>> origin/main
## [0.2.2](https://github.com/CS-Foundry/CSF-Core/compare/v0.2.1...v0.2.2) (2026-01-05)


Expand Down
Loading
Loading