Skip to content

feat: add HTTP server and Dockerfile for Azure Container App#3

Merged
MarkAC007 merged 2 commits intomainfrom
feat/azure-container-app
Mar 27, 2026
Merged

feat: add HTTP server and Dockerfile for Azure Container App#3
MarkAC007 merged 2 commits intomainfrom
feat/azure-container-app

Conversation

@MarkAC007
Copy link
Copy Markdown
Owner

Summary

  • Add src/server.ts: HTTP server wrapping existing Lambda handler (POST /assess, GET /health)
  • Update secrets.ts: add SECRETS_BACKEND=env mode to skip AWS Secrets Manager and read API keys from environment variables only
  • Add Dockerfile: Node.js 20 Alpine container image for Azure Container App deployment
  • Add build:server and start scripts to package.json

Context

The SCF Controls Platform is migrating from AWS to Azure. The DPSIA Lambda function needs to be deployed as an Azure Container App. This PR adds the HTTP wrapper and containerisation support while preserving the existing Lambda deployment path.

Companion PR: MarkAC007/scf-controls-platform#475

Test plan

  • npm run build:server produces dist/server.js
  • docker build -t scf-dpsia . builds successfully
  • docker run -e ANTHROPIC_API_KEY=... -e PERPLEXITY_API_KEY=... -e GOOGLE_API_KEY=... -e XAI_API_KEY=... -p 3000:3000 scf-dpsia starts and responds to GET /health
  • POST /assess with valid payload returns assessment output

🤖 Generated with Claude Code

- Add src/server.ts: HTTP server wrapping existing handler (POST /assess, GET /health)
- Update secrets.ts: support SECRETS_BACKEND=env for env-only API key loading
- Add Dockerfile: Node.js 20 Alpine container for Azure deployment
- Add build:server and start scripts to package.json

This enables deploying the DPSIA service as an Azure Container App
alongside the SCF Controls Platform, replacing the AWS Lambda invocation.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Comment thread Dockerfile Fixed
Add USER node directive to Dockerfile to address Semgrep
dockerfile.security.missing-user.missing-user finding.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@MarkAC007 MarkAC007 merged commit 207b1ce into main Mar 27, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants