-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add Key Vault and GitHub Actions #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…odule configurations
…update related configurations
…ith Docker image build and push
WalkthroughThis PR introduces a GitHub Actions workflow for Terraform-based infrastructure deployment to Azure, alongside Docker image building and App Service management. Infrastructure code is refactored to rename "api" references to "server" throughout, integrates Azure Key Vault for secrets management, transitions the AI module from a data source to a managed resource, and updates the server application to retrieve configuration from Key Vault instead of environment variables. Changes
Sequence Diagram(s)sequenceDiagram
actor User
participant GHA as GitHub Actions
participant Azure as Azure
participant ACR as Azure Container<br/>Registry
participant AppSvc as App Services
User->>GHA: Push to master/dev or manual dispatch
rect rgb(200, 220, 255)
Note over GHA,Azure: Terraform Job
GHA->>Azure: Login with credentials
GHA->>Azure: Init Terraform (backend config from secrets)
GHA->>Azure: Format, validate, plan
alt on PR
GHA->>GHA: Comment plan on PR
end
alt on master push or apply action
GHA->>Azure: Apply Terraform plan
end
end
rect rgb(220, 255, 220)
Note over GHA,AppSvc: Build & Push Job (depends on Terraform)
GHA->>Azure: Re-login, init Terraform backend
GHA->>Azure: Fetch outputs (acr_name, repo names, app names)
GHA->>ACR: Login to Container Registry
GHA->>ACR: Build & push server image
GHA->>ACR: Build & push web image
GHA->>AppSvc: Restart server App Service
GHA->>AppSvc: Restart web App Service
end
AppSvc-->>User: Deployment complete
sequenceDiagram
participant App as Server App<br/>(startup)
participant KV as Azure Key Vault
participant Env as Environment<br/>Variables
rect rgb(255, 240, 200)
Note over App,Env: Config Resolution Priority
end
App->>App: Check AZURE_KEY_VAULT_URI set?
alt Key Vault Available
App->>KV: Fetch secret (e.g. database-url)
KV-->>App: Secret value
else Key Vault Not Available
App->>Env: Check environment variable
Env-->>App: Value or empty
alt Has env value
App->>App: Use env value
else No env value
App->>App: Use default or 'missing_env_var'
end
end
App->>App: AppConfig initialized with resolved values
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Areas requiring extra attention:
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: ASSERTIVE Plan: Free 📒 Files selected for processing (19)
Tip 📝 Customizable high-level summaries are now available in beta!You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.
Example instruction:
Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later. Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
Summary by CodeRabbit
New Features
Infrastructure Updates
✏️ Tip: You can customize this high-level summary in your review settings.