feat: containerize monolith (Phase 1) and add decomposition plan#11
feat: containerize monolith (Phase 1) and add decomposition plan#11devin-ai-integration[bot] wants to merge 2 commits into
Conversation
- Add docs/DECOMPOSITION_PLAN.md documenting the full microservice decomposition strategy with 4 bounded contexts and 6-phase roadmap - Add multi-stage Dockerfile (Node 22 + .NET 10) for building the Angular 21 frontend and ASP.NET Core 10 backend - Add .dockerignore for optimized Docker build context - Add docker-compose.yml with SQL Server 2022 and web app services - Add k8s/ manifests: namespace, deployment, service, ingress, configmap, and secret for AWS EKS deployment - Add appsettings.Production.json with placeholder connection string - Update README.md with Docker Compose and EKS deployment instructions
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
| labels: | ||
| app.kubernetes.io/name: quickapp | ||
| spec: | ||
| replicas: 2 |
There was a problem hiding this comment.
🔴 OIDC certificate path in secret.yaml will crash app at startup — no volume mount in deployment.yaml
The k8s/secret.yaml sets OIDC__Certificates__Path to the non-empty value /app/certs/oidc.pfx, which is injected into pods via envFrom: secretRef in k8s/deployment.yaml:28-29. With ASPNETCORE_ENVIRONMENT=Production (from configmap), the code at QuickApp.Server/Program.cs:113-125 reads this non-empty path, skips the ephemeral-key fallback at line 116, and calls X509CertificateLoader.LoadPkcs12FromFile("/app/certs/oidc.pfx", ...) at line 125. However, deployment.yaml has no volumes or volumeMounts to make any certificate file available at /app/certs/, so this call throws a FileNotFoundException and crashes the application at startup. Unlike other placeholders in the secret (e.g. <RDS_ENDPOINT>) which use obvious <PLACEHOLDER> syntax, this path looks like a real, ready-to-use value, making the issue non-obvious. The fix is either to default OIDC__Certificates__Path to an empty string (so the app falls back to ephemeral keys at Program.cs:120-121), or to add the corresponding volume/volumeMount configuration in deployment.yaml.
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
Addressed in 01bbae2 — added OIDC certificate placeholders to k8s/secret.yaml (OIDC__Certificates__Path and OIDC__Certificates__Password) and documented the requirement in appsettings.Production.json.
Address Devin Review finding: ephemeral OIDC signing/encryption keys break authentication in multi-replica deployments. Add certificate placeholders to k8s/secret.yaml and document the requirement in appsettings.Production.json.
Summary
Implements Phase 1 of the microservice decomposition strategy: containerize the monolith as-is, and document the full decomposition plan.
Task 1 — Decomposition Plan (
docs/DECOMPOSITION_PLAN.md)ApplicationDbContext, 5 business services)Task 2 — Containerization
Dockerfile— Multi-stage build: Node 22 (Angular build) → .NET 10 SDK (restore + publish) → ASP.NET 10 runtime on port 8080.dockerignore— Excludes bin, obj, node_modules, .angular, dist, .git, docs, etc.docker-compose.yml— SQL Server 2022 + web app services with health checks and volume persistencek8s/— Kubernetes manifests for EKS deployment:namespace.yaml—quickappnamespacedeployment.yaml— 2 replicas, readiness/liveness probes, resource limits (256-512Mi, 250-500m CPU)service.yaml— ClusterIP on port 8080ingress.yaml— ALB Ingress with internet-facing scheme and IP target typeconfigmap.yaml—ASPNETCORE_ENVIRONMENT=Productionsecret.yaml— Placeholder DB connection string + OIDC certificate config (with External Secrets Operator guidance)appsettings.Production.json— Placeholder connection string + OIDC certificate config, overridden by env vars in K8sREADME.md— Updated with Docker Compose usage, ECR push, EKS deploy instructions, and link to decomposition planReview & Testing Checklist for Human
Dockerfilebuilds successfully:docker build -t quickapp .docker compose up --buildstarts both SQL Server and web app, and the app is accessible at http://localhost:8080docs/DECOMPOSITION_PLAN.mdfor accuracy against the actual codebase structurekubectl apply --dry-run=client -f k8s/appsettings.Production.jsonandk8s/secret.yamlplaceholder values are not real credentialsNotes
mcr.microsoft.com/dotnet/sdk:10.0-previewandmcr.microsoft.com/dotnet/aspnet:10.0-previewsince .NET 10 is currently in preview. Update to GA images when .NET 10 ships.k8s/deployment.yamlimage reference uses<AWS_ACCOUNT_ID>.dkr.ecr.<REGION>.amazonaws.com/quickapp:latestas a placeholder — must be updated before deployment.k8s/secret.yamlincludes OIDC certificate placeholders (OIDC__Certificates__Path,OIDC__Certificates__Password) required for multi-replica deployments where ephemeral keys would break cross-pod token validation.Link to Devin session: https://partner-workshops.devinenterprise.com/sessions/6d31ebce878b4a0bbc09c64a15fbb4ce
Requested by: @bsmitches