Refactor auth-service to iam-service and update related configurations
- Renamed auth-service to iam-service across various files for consistency. - Updated deployment workflows, database migration scripts, and documentation to reflect the service name change. - Enhanced bilingual documentation for clarity on the new service structure and usage. - Removed outdated references to auth-service in scripts and configuration files to streamline the project structure.
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
name: Auth Service CI
|
||||
name: IAM Service CI
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'services/auth-service/**'
|
||||
- 'services/iam-service/**'
|
||||
- 'packages/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'services/auth-service/**'
|
||||
- 'services/iam-service/**'
|
||||
- 'packages/**'
|
||||
|
||||
jobs:
|
||||
@@ -48,26 +48,26 @@ jobs:
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Generate Prisma Client
|
||||
run: pnpm --filter @goodgo/auth-service prisma:generate
|
||||
run: pnpm --filter @goodgo/iam-service prisma:generate
|
||||
env:
|
||||
# Use Neon test DB if available, otherwise fallback to local PostgreSQL
|
||||
DATABASE_URL: ${{ secrets.NEON_DATABASE_URL_TEST != '' && secrets.NEON_DATABASE_URL_TEST || 'postgresql://testuser:testpass@localhost:5432/test_db' }}
|
||||
|
||||
- name: Run migrations
|
||||
run: pnpm --filter @goodgo/auth-service prisma migrate deploy
|
||||
run: pnpm --filter @goodgo/iam-service prisma migrate deploy
|
||||
env:
|
||||
DATABASE_URL: ${{ secrets.NEON_DATABASE_URL_TEST != '' && secrets.NEON_DATABASE_URL_TEST || 'postgresql://testuser:testpass@localhost:5432/test_db' }}
|
||||
|
||||
- name: Lint
|
||||
run: pnpm --filter @goodgo/auth-service lint
|
||||
run: pnpm --filter @goodgo/iam-service lint
|
||||
|
||||
- name: Type check
|
||||
run: pnpm --filter @goodgo/auth-service typecheck
|
||||
run: pnpm --filter @goodgo/iam-service typecheck
|
||||
|
||||
- name: Build
|
||||
run: pnpm --filter @goodgo/auth-service build
|
||||
run: pnpm --filter @goodgo/iam-service build
|
||||
|
||||
- name: Test
|
||||
run: pnpm --filter @goodgo/auth-service test
|
||||
run: pnpm --filter @goodgo/iam-service test
|
||||
env:
|
||||
DATABASE_URL: ${{ secrets.NEON_DATABASE_URL_TEST != '' && secrets.NEON_DATABASE_URL_TEST || 'postgresql://testuser:testpass@localhost:5432/test_db' }}
|
||||
10
.github/workflows/deploy-production.yml
vendored
10
.github/workflows/deploy-production.yml
vendored
@@ -29,7 +29,7 @@ jobs:
|
||||
|
||||
- name: Run database migrations
|
||||
run: |
|
||||
cd services/auth-service
|
||||
cd services/iam-service
|
||||
pnpm prisma generate
|
||||
pnpm prisma migrate deploy
|
||||
env:
|
||||
@@ -43,13 +43,13 @@ jobs:
|
||||
echo "${{ secrets.KUBECONFIG_PRODUCTION }}" | base64 -d > kubeconfig
|
||||
export KUBECONFIG=./kubeconfig
|
||||
|
||||
- name: Deploy Auth Service
|
||||
- name: Deploy IAM Service
|
||||
run: |
|
||||
export KUBECONFIG=./kubeconfig
|
||||
kubectl apply -f deployments/production/kubernetes/auth-service.yaml
|
||||
kubectl apply -f deployments/production/kubernetes/configmap.yaml
|
||||
kubectl apply -f deployments/production/kubernetes/iam-service.yaml
|
||||
kubectl apply -f deployments/production/kubernetes/iam-service-configmap.yaml
|
||||
kubectl apply -f deployments/production/kubernetes/ingress.yaml
|
||||
kubectl rollout status deployment/auth-service -n production
|
||||
kubectl rollout status deployment/iam-service -n production
|
||||
|
||||
- name: Deploy Web App
|
||||
run: |
|
||||
|
||||
10
.github/workflows/deploy-staging.yml
vendored
10
.github/workflows/deploy-staging.yml
vendored
@@ -28,7 +28,7 @@ jobs:
|
||||
|
||||
- name: Run database migrations
|
||||
run: |
|
||||
cd services/auth-service
|
||||
cd services/iam-service
|
||||
pnpm prisma generate
|
||||
pnpm prisma migrate deploy
|
||||
env:
|
||||
@@ -42,13 +42,13 @@ jobs:
|
||||
echo "${{ secrets.KUBECONFIG_STAGING }}" | base64 -d > kubeconfig
|
||||
export KUBECONFIG=./kubeconfig
|
||||
|
||||
- name: Deploy Auth Service
|
||||
- name: Deploy IAM Service
|
||||
run: |
|
||||
export KUBECONFIG=./kubeconfig
|
||||
kubectl apply -f deployments/staging/kubernetes/auth-service.yaml
|
||||
kubectl apply -f deployments/staging/kubernetes/configmap.yaml
|
||||
kubectl apply -f deployments/staging/kubernetes/iam-service.yaml
|
||||
kubectl apply -f deployments/staging/kubernetes/iam-service-configmap.yaml
|
||||
kubectl apply -f deployments/staging/kubernetes/ingress.yaml
|
||||
kubectl rollout status deployment/auth-service -n staging
|
||||
kubectl rollout status deployment/iam-service -n staging
|
||||
|
||||
- name: Deploy Web App
|
||||
run: |
|
||||
|
||||
16
.github/workflows/docker-build.yml
vendored
16
.github/workflows/docker-build.yml
vendored
@@ -6,12 +6,12 @@ on:
|
||||
- main
|
||||
- develop
|
||||
paths:
|
||||
- 'services/auth-service/**'
|
||||
- 'services/iam-service/**'
|
||||
- 'apps/web-*/**'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-auth-service:
|
||||
build-iam-service:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@@ -25,16 +25,16 @@ jobs:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build and push Auth Service
|
||||
- name: Build and push IAM Service
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: ./services/auth-service
|
||||
context: ./services/iam-service
|
||||
push: true
|
||||
tags: |
|
||||
goodgo/auth-service:latest
|
||||
goodgo/auth-service:${{ github.sha }}
|
||||
cache-from: type=registry,ref=goodgo/auth-service:buildcache
|
||||
cache-to: type=registry,ref=goodgo/auth-service:buildcache,mode=max
|
||||
goodgo/iam-service:latest
|
||||
goodgo/iam-service:${{ github.sha }}
|
||||
cache-from: type=registry,ref=goodgo/iam-service:buildcache
|
||||
cache-to: type=registry,ref=goodgo/iam-service:buildcache,mode=max
|
||||
|
||||
build-web-admin:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
Reference in New Issue
Block a user