mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 16:41:08 +02:00
chore: replace all mana-core-auth references with mana-auth
Update docker-compose (dev + macmini), CI/CD workflows, Prometheus, package.json scripts, env generation, database setup, CODEOWNERS, and dependabot to reference the new Hono-based mana-auth service. Delete zombie mana-core-auth directory (already removed from Git). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
e7bcb230be
commit
099a40bbd1
14 changed files with 70 additions and 97 deletions
3
.github/CODEOWNERS
vendored
3
.github/CODEOWNERS
vendored
|
|
@ -25,8 +25,7 @@ docker/caddy/Caddyfile.production @wuesteon
|
|||
# =============================================================================
|
||||
# Shared packages and services that affect all apps
|
||||
|
||||
services/mana-core-auth/ @wuesteon
|
||||
packages/shared-nestjs-auth/ @wuesteon
|
||||
services/mana-auth/ @wuesteon
|
||||
packages/shared-auth/ @wuesteon
|
||||
|
||||
# =============================================================================
|
||||
|
|
|
|||
2
.github/dependabot.yml
vendored
2
.github/dependabot.yml
vendored
|
|
@ -56,7 +56,7 @@ updates:
|
|||
|
||||
# Docker updates
|
||||
- package-ecosystem: "docker"
|
||||
directory: "/services/mana-core-auth"
|
||||
directory: "/services/mana-auth"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
day: "monday"
|
||||
|
|
|
|||
10
.github/workflows/cd-macmini.yml
vendored
10
.github/workflows/cd-macmini.yml
vendored
|
|
@ -25,7 +25,7 @@ on:
|
|||
options:
|
||||
- all
|
||||
- matrix-web
|
||||
- mana-core-auth
|
||||
- mana-auth
|
||||
- chat-backend
|
||||
- chat-web
|
||||
- todo-backend
|
||||
|
|
@ -64,7 +64,7 @@ jobs:
|
|||
if: github.event_name == 'push'
|
||||
outputs:
|
||||
matrix-web: ${{ steps.changes.outputs.matrix-web }}
|
||||
mana-core-auth: ${{ steps.changes.outputs.mana-core-auth }}
|
||||
mana-auth: ${{ steps.changes.outputs.mana-auth }}
|
||||
chat-backend: ${{ steps.changes.outputs.chat-backend }}
|
||||
chat-web: ${{ steps.changes.outputs.chat-web }}
|
||||
todo-backend: ${{ steps.changes.outputs.todo-backend }}
|
||||
|
|
@ -120,7 +120,7 @@ jobs:
|
|||
echo ""
|
||||
|
||||
check_changes "matrix-web" "apps/matrix/apps/web/" "apps/matrix/packages/"
|
||||
check_changes "mana-core-auth" "services/mana-core-auth/"
|
||||
check_changes "mana-auth" "services/mana-auth/"
|
||||
check_changes "chat-backend" "apps/chat/apps/backend/" "apps/chat/packages/"
|
||||
check_changes "chat-web" "apps/chat/apps/web/" "apps/chat/packages/"
|
||||
check_changes "todo-backend" "apps/todo/apps/backend/" "apps/todo/packages/"
|
||||
|
|
@ -140,7 +140,7 @@ jobs:
|
|||
|
||||
# Check if anything needs deploying
|
||||
ANY="false"
|
||||
for svc in matrix-web mana-core-auth chat-backend chat-web todo-backend todo-web calendar-backend calendar-web clock-web contacts-backend contacts-web mukke-backend mukke-web storage-backend storage-web mana-matrix-bot mana-landing-builder; do
|
||||
for svc in matrix-web mana-auth chat-backend chat-web todo-backend todo-web calendar-backend calendar-web clock-web contacts-backend contacts-web mukke-backend mukke-web storage-backend storage-web mana-matrix-bot mana-landing-builder; do
|
||||
val=$(grep "^$svc=" $GITHUB_OUTPUT | tail -1 | cut -d= -f2)
|
||||
if [ "$val" == "true" ]; then
|
||||
ANY="true"
|
||||
|
|
@ -202,7 +202,7 @@ jobs:
|
|||
else
|
||||
# Build list from detected changes
|
||||
if [ "${{ needs.detect-changes.outputs.matrix-web }}" == "true" ]; then SERVICES="$SERVICES matrix-web"; fi
|
||||
if [ "${{ needs.detect-changes.outputs.mana-core-auth }}" == "true" ]; then SERVICES="$SERVICES mana-auth"; fi
|
||||
if [ "${{ needs.detect-changes.outputs.mana-auth }}" == "true" ]; then SERVICES="$SERVICES mana-auth"; fi
|
||||
if [ "${{ needs.detect-changes.outputs.chat-backend }}" == "true" ]; then SERVICES="$SERVICES chat-backend"; fi
|
||||
if [ "${{ needs.detect-changes.outputs.chat-web }}" == "true" ]; then SERVICES="$SERVICES chat-web"; fi
|
||||
if [ "${{ needs.detect-changes.outputs.todo-backend }}" == "true" ]; then SERVICES="$SERVICES todo-backend"; fi
|
||||
|
|
|
|||
26
.github/workflows/ci.yml
vendored
26
.github/workflows/ci.yml
vendored
|
|
@ -49,7 +49,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
|
||||
outputs:
|
||||
mana-core-auth: ${{ steps.changes.outputs.mana-core-auth }}
|
||||
mana-auth: ${{ steps.changes.outputs.mana-auth }}
|
||||
mana-search: ${{ steps.changes.outputs.mana-search }}
|
||||
manacore-web: ${{ steps.changes.outputs.manacore-web }}
|
||||
chat-backend: ${{ steps.changes.outputs.chat-backend }}
|
||||
|
|
@ -82,7 +82,7 @@ jobs:
|
|||
# Force build all if workflow_dispatch with force_build_all
|
||||
if [ "${{ github.event_name }}" == "workflow_dispatch" ] && [ "${{ inputs.force_build_all }}" == "true" ]; then
|
||||
echo "Force rebuild all services requested"
|
||||
echo "mana-core-auth=true" >> $GITHUB_OUTPUT
|
||||
echo "mana-auth=true" >> $GITHUB_OUTPUT
|
||||
echo "mana-search=true" >> $GITHUB_OUTPUT
|
||||
echo "manacore-web=true" >> $GITHUB_OUTPUT
|
||||
echo "chat-backend=true" >> $GITHUB_OUTPUT
|
||||
|
|
@ -119,7 +119,7 @@ jobs:
|
|||
else
|
||||
# workflow_dispatch without force - build all
|
||||
echo "Workflow dispatch without force_build_all - building all"
|
||||
echo "mana-core-auth=true" >> $GITHUB_OUTPUT
|
||||
echo "mana-auth=true" >> $GITHUB_OUTPUT
|
||||
echo "mana-search=true" >> $GITHUB_OUTPUT
|
||||
echo "manacore-web=true" >> $GITHUB_OUTPUT
|
||||
echo "chat-backend=true" >> $GITHUB_OUTPUT
|
||||
|
|
@ -171,12 +171,12 @@ jobs:
|
|||
echo "Shared UI changed: $SHARED_UI_CHANGED"
|
||||
echo "Shared web changed: $SHARED_WEB_CHANGED"
|
||||
|
||||
# mana-core-auth: services/mana-core-auth + packages/shared-nestjs-auth
|
||||
AUTH_CHANGED=$(check_pattern "services/mana-core-auth/|packages/shared-nestjs-auth/")
|
||||
# mana-auth: services/mana-auth
|
||||
AUTH_CHANGED=$(check_pattern "services/mana-auth/")
|
||||
if [ "$COMMON_CHANGED" == "true" ] || [ "$AUTH_CHANGED" == "true" ]; then
|
||||
echo "mana-core-auth=true" >> $GITHUB_OUTPUT
|
||||
echo "mana-auth=true" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "mana-core-auth=false" >> $GITHUB_OUTPUT
|
||||
echo "mana-auth=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
# mana-search: services/mana-search
|
||||
|
|
@ -352,7 +352,7 @@ jobs:
|
|||
echo "" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| Service | Will Build |" >> $GITHUB_STEP_SUMMARY
|
||||
echo "|---------|------------|" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| mana-core-auth | ${{ steps.changes.outputs.mana-core-auth }} |" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| mana-auth | ${{ steps.changes.outputs.mana-auth }} |" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| mana-search | ${{ steps.changes.outputs.mana-search }} |" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| manacore-web | ${{ steps.changes.outputs.manacore-web }} |" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| chat-backend | ${{ steps.changes.outputs.chat-backend }} |" >> $GITHUB_STEP_SUMMARY
|
||||
|
|
@ -440,11 +440,11 @@ jobs:
|
|||
# Build Docker images - only changed services
|
||||
# ===========================================
|
||||
|
||||
build-mana-core-auth:
|
||||
name: Build mana-core-auth
|
||||
build-mana-auth:
|
||||
name: Build mana-auth
|
||||
runs-on: ubuntu-latest
|
||||
needs: detect-changes
|
||||
if: needs.detect-changes.outputs.mana-core-auth == 'true'
|
||||
if: needs.detect-changes.outputs.mana-auth == 'true'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: docker/setup-qemu-action@v3
|
||||
|
|
@ -457,12 +457,12 @@ jobs:
|
|||
- uses: docker/metadata-action@v5
|
||||
id: meta
|
||||
with:
|
||||
images: ghcr.io/${{ github.repository_owner }}/mana-core-auth
|
||||
images: ghcr.io/${{ github.repository_owner }}/mana-auth
|
||||
tags: type=raw,value=latest
|
||||
- uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: services/mana-core-auth/Dockerfile
|
||||
file: services/mana-auth/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
|
|
|
|||
42
.github/workflows/daily-tests.yml
vendored
42
.github/workflows/daily-tests.yml
vendored
|
|
@ -4,7 +4,7 @@
|
|||
# Manual Trigger: workflow_dispatch for on-demand test runs
|
||||
# Features:
|
||||
# - Integration tests (E2E flows)
|
||||
# - mana-core-auth service tests with coverage
|
||||
# - mana-auth service tests with coverage
|
||||
# - Database setup/teardown
|
||||
# - Discord notifications (always sent on success or failure)
|
||||
|
||||
|
|
@ -38,9 +38,9 @@ env:
|
|||
COVERAGE_THRESHOLD: ${{ github.event.inputs.coverage_threshold || '80' }}
|
||||
|
||||
jobs:
|
||||
# Job 1: Test mana-core-auth with coverage
|
||||
test-mana-core-auth:
|
||||
name: Test mana-core-auth
|
||||
# Job 1: Test mana-auth with coverage
|
||||
test-mana-auth:
|
||||
name: Test mana-auth
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
services:
|
||||
|
|
@ -90,13 +90,13 @@ jobs:
|
|||
run: pnpm run build:packages
|
||||
|
||||
- name: Setup test database
|
||||
working-directory: services/mana-core-auth
|
||||
working-directory: services/mana-auth
|
||||
env:
|
||||
DATABASE_URL: postgresql://manacore:testpassword@localhost:5432/manacore
|
||||
run: pnpm run db:migrate
|
||||
|
||||
- name: Run tests with coverage
|
||||
working-directory: services/mana-core-auth
|
||||
working-directory: services/mana-auth
|
||||
env:
|
||||
DATABASE_URL: postgresql://manacore:testpassword@localhost:5432/manacore
|
||||
REDIS_URL: redis://localhost:6379
|
||||
|
|
@ -114,16 +114,16 @@ jobs:
|
|||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: coverage-mana-core-auth
|
||||
path: services/mana-core-auth/coverage
|
||||
name: coverage-mana-auth
|
||||
path: services/mana-auth/coverage
|
||||
retention-days: 30
|
||||
|
||||
- name: Check coverage threshold
|
||||
working-directory: services/mana-core-auth
|
||||
working-directory: services/mana-auth
|
||||
run: |
|
||||
if [ -f "coverage/coverage-summary.json" ]; then
|
||||
COVERAGE=$(node -e "const c = require('./coverage/coverage-summary.json'); console.log(c.total.lines.pct)")
|
||||
echo "Coverage for mana-core-auth: ${COVERAGE}%"
|
||||
echo "Coverage for mana-auth: ${COVERAGE}%"
|
||||
|
||||
if (( $(echo "$COVERAGE < $COVERAGE_THRESHOLD" | bc -l) )); then
|
||||
echo "::error::Coverage ${COVERAGE}% is below threshold ${COVERAGE_THRESHOLD}%"
|
||||
|
|
@ -183,7 +183,7 @@ jobs:
|
|||
run: pnpm run build:packages
|
||||
|
||||
- name: Setup databases for integration tests
|
||||
working-directory: services/mana-core-auth
|
||||
working-directory: services/mana-auth
|
||||
env:
|
||||
DATABASE_URL: postgresql://manacore:testpassword@localhost:5432/manacore
|
||||
run: pnpm run db:migrate
|
||||
|
|
@ -197,7 +197,7 @@ jobs:
|
|||
JWT_AUDIENCE: manacore
|
||||
run: |
|
||||
# Run auth integration tests
|
||||
cd services/mana-core-auth
|
||||
cd services/mana-auth
|
||||
if [ -d "test/integration" ]; then
|
||||
pnpm run test:e2e || pnpm run test -- test/integration
|
||||
fi
|
||||
|
|
@ -207,13 +207,13 @@ jobs:
|
|||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: integration-test-results
|
||||
path: services/mana-core-auth/test-results
|
||||
path: services/mana-auth/test-results
|
||||
retention-days: 30
|
||||
|
||||
# Job 3: Always send Discord notification (success or failure)
|
||||
notify:
|
||||
name: Discord Notification
|
||||
needs: [test-mana-core-auth, test-integration]
|
||||
needs: [test-mana-auth, test-integration]
|
||||
if: always()
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
|
|
@ -224,15 +224,15 @@ jobs:
|
|||
- name: Download coverage summary
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: coverage-mana-core-auth
|
||||
path: coverage-mana-core-auth
|
||||
name: coverage-mana-auth
|
||||
path: coverage-mana-auth
|
||||
continue-on-error: true
|
||||
|
||||
- name: Check test results
|
||||
id: check
|
||||
run: |
|
||||
# Check if both jobs succeeded
|
||||
AUTH_STATUS="${{ needs.test-mana-core-auth.result }}"
|
||||
AUTH_STATUS="${{ needs.test-mana-auth.result }}"
|
||||
INTEGRATION_STATUS="${{ needs.test-integration.result }}"
|
||||
|
||||
if [ "$AUTH_STATUS" = "success" ] && [ "$INTEGRATION_STATUS" = "success" ]; then
|
||||
|
|
@ -249,8 +249,8 @@ jobs:
|
|||
echo "run_url=$RUN_URL" >> $GITHUB_OUTPUT
|
||||
|
||||
# Get coverage if available
|
||||
if [ -f "coverage-mana-core-auth/coverage-summary.json" ]; then
|
||||
COVERAGE=$(node -e "const c = require('./coverage-mana-core-auth/coverage-summary.json'); console.log(c.total.lines.pct)")
|
||||
if [ -f "coverage-mana-auth/coverage-summary.json" ]; then
|
||||
COVERAGE=$(node -e "const c = require('./coverage-mana-auth/coverage-summary.json'); console.log(c.total.lines.pct)")
|
||||
echo "coverage=${COVERAGE}%" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "coverage=N/A" >> $GITHUB_OUTPUT
|
||||
|
|
@ -296,8 +296,8 @@ jobs:
|
|||
\"inline\": true
|
||||
},
|
||||
{
|
||||
\"name\": \"🧪 mana-core-auth\",
|
||||
\"value\": \"${{ needs.test-mana-core-auth.result }}\",
|
||||
\"name\": \"🧪 mana-auth\",
|
||||
\"value\": \"${{ needs.test-mana-auth.result }}\",
|
||||
\"inline\": true
|
||||
},
|
||||
{
|
||||
|
|
|
|||
6
.github/workflows/docker-validate.yml
vendored
6
.github/workflows/docker-validate.yml
vendored
|
|
@ -82,7 +82,7 @@ jobs:
|
|||
# Job 2: Build representative Docker images
|
||||
# ===========================================
|
||||
# Builds a subset that covers all shared packages:
|
||||
# - mana-core-auth: covers shared-storage, shared-nestjs-auth, shared-llm
|
||||
# - mana-auth: covers auth service (Hono + Bun)
|
||||
# - todo-web: covers most shared-* web packages
|
||||
# - zitare-web: covers content packages, shared-pwa
|
||||
# - calendar-web: covers calendar shared packages
|
||||
|
|
@ -97,8 +97,8 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- service: mana-core-auth
|
||||
dockerfile: services/mana-core-auth/Dockerfile
|
||||
- service: mana-auth
|
||||
dockerfile: services/mana-auth/Dockerfile
|
||||
context: .
|
||||
- service: todo-backend
|
||||
dockerfile: apps/todo/apps/backend/Dockerfile
|
||||
|
|
|
|||
|
|
@ -102,36 +102,24 @@ services:
|
|||
networks:
|
||||
- manacore-network
|
||||
|
||||
# Mana Core Auth Service
|
||||
mana-core-auth:
|
||||
# Mana Auth Service (Hono + Bun + Better Auth)
|
||||
mana-auth:
|
||||
profiles: ["auth", "all"]
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./services/mana-core-auth/Dockerfile
|
||||
container_name: manacore-auth
|
||||
dockerfile: ./services/mana-auth/Dockerfile
|
||||
container_name: mana-auth
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
NODE_ENV: development
|
||||
PORT: 3001
|
||||
DATABASE_URL: postgresql://${POSTGRES_USER:-manacore}:${POSTGRES_PASSWORD:-devpassword}@postgres:5432/manacore
|
||||
REDIS_HOST: redis
|
||||
REDIS_PORT: 6379
|
||||
REDIS_PASSWORD: ${REDIS_PASSWORD:-devpassword}
|
||||
JWT_PUBLIC_KEY: ${JWT_PUBLIC_KEY}
|
||||
JWT_PRIVATE_KEY: ${JWT_PRIVATE_KEY}
|
||||
JWT_ACCESS_TOKEN_EXPIRY: ${JWT_ACCESS_TOKEN_EXPIRY:-15m}
|
||||
JWT_REFRESH_TOKEN_EXPIRY: ${JWT_REFRESH_TOKEN_EXPIRY:-7d}
|
||||
JWT_ISSUER: ${JWT_ISSUER:-manacore}
|
||||
JWT_AUDIENCE: ${JWT_AUDIENCE:-manacore}
|
||||
DATABASE_URL: postgresql://${POSTGRES_USER:-manacore}:${POSTGRES_PASSWORD:-devpassword}@postgres:5432/mana_auth
|
||||
BETTER_AUTH_SECRET: ${BETTER_AUTH_SECRET:-dev-secret-change-me}
|
||||
BETTER_AUTH_URL: http://localhost:3001
|
||||
CORS_ORIGINS: ${CORS_ORIGINS:-http://localhost:3000,http://localhost:5173,http://localhost:8081}
|
||||
CREDITS_SIGNUP_BONUS: ${CREDITS_SIGNUP_BONUS:-150}
|
||||
CREDITS_DAILY_FREE: ${CREDITS_DAILY_FREE:-5}
|
||||
GOOGLE_GENAI_API_KEY: ${GOOGLE_GENAI_API_KEY}
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
ports:
|
||||
- "3001:3001"
|
||||
networks:
|
||||
|
|
@ -157,7 +145,7 @@ services:
|
|||
AZURE_OPENAI_ENDPOINT: ${AZURE_OPENAI_ENDPOINT}
|
||||
AZURE_OPENAI_API_KEY: ${AZURE_OPENAI_API_KEY}
|
||||
AZURE_OPENAI_API_VERSION: ${AZURE_OPENAI_API_VERSION:-2024-12-01-preview}
|
||||
MANA_CORE_AUTH_URL: http://mana-core-auth:3001
|
||||
MANA_CORE_AUTH_URL: http://mana-auth:3001
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
|
|
|
|||
|
|
@ -50,9 +50,9 @@ scrape_configs:
|
|||
# ============================================
|
||||
|
||||
# Auth Service
|
||||
- job_name: 'mana-core-auth'
|
||||
- job_name: 'mana-auth'
|
||||
static_configs:
|
||||
- targets: ['mana-core-auth:3001']
|
||||
- targets: ['mana-auth:3001']
|
||||
metrics_path: '/metrics'
|
||||
scrape_interval: 30s
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
"setup:db": "./scripts/setup-databases.sh",
|
||||
"setup:db:chat": "./scripts/setup-databases.sh chat",
|
||||
"setup:db:auth": "./scripts/setup-databases.sh auth",
|
||||
"seed:dev-user": "pnpm --filter mana-core-auth db:seed:dev",
|
||||
"seed:dev-user": "pnpm --filter @mana/auth db:seed:dev",
|
||||
"build:packages": "pnpm --filter '@manacore/*' build",
|
||||
"postinstall": "node scripts/generate-env.mjs || true && pnpm run build:packages || true",
|
||||
"manacore:dev": "turbo run dev --filter=manacore...",
|
||||
|
|
@ -52,7 +52,7 @@
|
|||
"dev:chat:landing": "pnpm --filter @chat/landing dev",
|
||||
"dev:chat:backend": "pnpm --filter @chat/backend start:dev",
|
||||
"dev:chat:app": "turbo run dev --filter=@chat/web --filter=@chat/backend",
|
||||
"dev:auth": "pnpm --filter mana-core-auth start:dev",
|
||||
"dev:auth": "cd services/mana-auth && bun run --watch src/index.ts",
|
||||
"dev:sync": "cd services/mana-sync && JWKS_URL=http://localhost:3001/api/auth/jwks DATABASE_URL=postgresql://manacore:devpassword@localhost:5432/mana_sync ./server",
|
||||
"dev:sync:build": "cd services/mana-sync && go build -o server ./cmd/server",
|
||||
"dev:chat:full": "./scripts/setup-databases.sh chat && ./scripts/setup-databases.sh auth && concurrently -n auth,backend,web -c blue,green,cyan \"pnpm dev:auth\" \"pnpm dev:chat:backend\" \"pnpm dev:chat:web\"",
|
||||
|
|
@ -227,7 +227,7 @@
|
|||
"docker:up:all": "docker compose -f docker-compose.dev.yml --env-file .env.development --profile all up -d",
|
||||
"docker:down": "docker compose -f docker-compose.dev.yml --env-file .env.development --profile all down",
|
||||
"docker:logs": "docker compose -f docker-compose.dev.yml --env-file .env.development logs -f",
|
||||
"docker:logs:auth": "docker compose -f docker-compose.dev.yml --env-file .env.development logs -f mana-core-auth",
|
||||
"docker:logs:auth": "docker compose -f docker-compose.dev.yml --env-file .env.development logs -f mana-auth",
|
||||
"docker:logs:chat": "docker compose -f docker-compose.dev.yml --env-file .env.development logs -f chat-backend",
|
||||
"docker:ps": "docker compose -f docker-compose.dev.yml --env-file .env.development ps -a",
|
||||
"docker:clean": "docker compose -f docker-compose.dev.yml --env-file .env.development --profile all down -v",
|
||||
|
|
|
|||
|
|
@ -56,30 +56,16 @@ function generateEnvContent(vars) {
|
|||
|
||||
// App configurations - maps source variables to target variables
|
||||
const APP_CONFIGS = [
|
||||
// Mana Core Auth Service
|
||||
// Mana Auth Service (Hono + Bun)
|
||||
{
|
||||
path: 'services/mana-core-auth/.env',
|
||||
path: 'services/mana-auth/.env',
|
||||
vars: {
|
||||
NODE_ENV: () => 'development',
|
||||
PORT: (env) => env.MANA_CORE_AUTH_PORT || '3001',
|
||||
DATABASE_URL: (env) => env.MANA_CORE_AUTH_DATABASE_URL,
|
||||
REDIS_HOST: (env) => env.REDIS_HOST,
|
||||
REDIS_PORT: (env) => env.REDIS_PORT,
|
||||
REDIS_PASSWORD: (env) => env.REDIS_PASSWORD || '',
|
||||
JWT_PRIVATE_KEY: (env) => env.JWT_PRIVATE_KEY,
|
||||
JWT_PUBLIC_KEY: (env) => env.JWT_PUBLIC_KEY,
|
||||
JWT_ACCESS_TOKEN_EXPIRY: (env) => env.JWT_ACCESS_TOKEN_EXPIRY,
|
||||
JWT_REFRESH_TOKEN_EXPIRY: (env) => env.JWT_REFRESH_TOKEN_EXPIRY,
|
||||
JWT_ISSUER: (env) => env.JWT_ISSUER,
|
||||
JWT_AUDIENCE: (env) => env.JWT_AUDIENCE,
|
||||
STRIPE_SECRET_KEY: (env) => env.STRIPE_SECRET_KEY,
|
||||
STRIPE_PUBLISHABLE_KEY: (env) => env.STRIPE_PUBLISHABLE_KEY,
|
||||
STRIPE_WEBHOOK_SECRET: (env) => env.STRIPE_WEBHOOK_SECRET,
|
||||
BETTER_AUTH_SECRET: (env) => env.BETTER_AUTH_SECRET || 'dev-secret-change-me',
|
||||
BETTER_AUTH_URL: () => 'http://localhost:3001',
|
||||
CORS_ORIGINS: (env) => env.CORS_ORIGINS,
|
||||
CREDITS_SIGNUP_BONUS: (env) => env.CREDITS_SIGNUP_BONUS,
|
||||
CREDITS_DAILY_FREE: (env) => env.CREDITS_DAILY_FREE,
|
||||
RATE_LIMIT_TTL: (env) => env.RATE_LIMIT_TTL,
|
||||
RATE_LIMIT_MAX: (env) => env.RATE_LIMIT_MAX,
|
||||
GOOGLE_GENAI_API_KEY: (env) => env.GOOGLE_GENAI_API_KEY,
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ POSTGRES_PASSWORD=your-secure-password
|
|||
# Redis
|
||||
REDIS_PASSWORD=your-redis-password
|
||||
|
||||
# JWT Keys (from mana-core-auth)
|
||||
# JWT Keys (from mana-auth)
|
||||
JWT_SECRET=your-jwt-secret
|
||||
JWT_PUBLIC_KEY=
|
||||
JWT_PRIVATE_KEY=
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ for container in $ALL_PROBLEM_CONTAINERS; do
|
|||
mana-app-photos-web) SERVICE_NAME="photos-web" ;;
|
||||
# mana-app-photos-backend: REMOVED
|
||||
mana-app-web) SERVICE_NAME="mana-web" ;;
|
||||
mana-core-auth) SERVICE_NAME="mana-auth" ;;
|
||||
mana-auth) SERVICE_NAME="mana-auth" ;;
|
||||
mana-core-gateway) SERVICE_NAME="api-gateway" ;;
|
||||
mana-core-search) SERVICE_NAME="mana-search" ;;
|
||||
mana-core-searxng) SERVICE_NAME="searxng" ;;
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ ALL_DATABASES=(
|
|||
"traces"
|
||||
"context"
|
||||
"citycorners"
|
||||
# New Hono service databases (extracted from mana-core-auth)
|
||||
# Hono service databases (extracted from former mana-core-auth)
|
||||
"mana_credits"
|
||||
"mana_user"
|
||||
"mana_subscriptions"
|
||||
|
|
@ -101,9 +101,9 @@ setup_service() {
|
|||
local service=$1
|
||||
|
||||
case $service in
|
||||
auth|mana-core-auth)
|
||||
create_db_if_not_exists "manacore"
|
||||
push_schema "mana-core-auth" "mana-core-auth"
|
||||
auth|mana-auth)
|
||||
create_db_if_not_exists "mana_auth"
|
||||
push_schema "@mana/auth" "mana-auth"
|
||||
;;
|
||||
chat)
|
||||
create_db_if_not_exists "chat"
|
||||
|
|
|
|||
|
|
@ -29,11 +29,11 @@ export DATABASE_URL_TEMPLATE="postgresql://manacore:devpassword@localhost:5432"
|
|||
|
||||
# Seed auth service
|
||||
seed_auth() {
|
||||
echo -e "\n${GREEN}Seeding mana-core-auth...${NC}"
|
||||
echo -e "\n${GREEN}Seeding mana-auth...${NC}"
|
||||
|
||||
export DATABASE_URL="${DATABASE_URL_TEMPLATE}/manacore"
|
||||
export DATABASE_URL="${DATABASE_URL_TEMPLATE}/mana_auth"
|
||||
|
||||
cd services/mana-core-auth
|
||||
cd services/mana-auth
|
||||
|
||||
# Run migrations
|
||||
pnpm run db:push
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue