feat: add HTTP server and Dockerfile for Azure Container App#3
Merged
feat: add HTTP server and Dockerfile for Azure Container App#3
Conversation
- 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]>
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/server.ts: HTTP server wrapping existing Lambda handler (POST /assess,GET /health)secrets.ts: addSECRETS_BACKEND=envmode to skip AWS Secrets Manager and read API keys from environment variables onlyDockerfile: Node.js 20 Alpine container image for Azure Container App deploymentbuild:serverandstartscripts topackage.jsonContext
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:serverproducesdist/server.jsdocker build -t scf-dpsia .builds successfullydocker run -e ANTHROPIC_API_KEY=... -e PERPLEXITY_API_KEY=... -e GOOGLE_API_KEY=... -e XAI_API_KEY=... -p 3000:3000 scf-dpsiastarts and responds toGET /healthPOST /assesswith valid payload returns assessment output🤖 Generated with Claude Code