Skip to content

Feature: Build Multi-Stage API Production Image #73

Description

@3m1n3nc3

Description

Create a minimal non-root production container for API and worker processes.

File Location

learnault-api/Dockerfile, .dockerignore, entrypoints, and image docs

Design Reference

API Roadmap Phase 0: Build Multi-Stage API Production Image.

Dependencies

  • Status: Blocked
  • Blocked by: Feature: Add Complete Backend CI Quality Gates
  • Blocks: Feature: Add Staging Deployment Rollback and Smoke Tests

Tasks

  • Separate dependency, build, and runtime stages
  • Generate Prisma Client and compile TypeScript during build
  • Run as non-root
  • Exclude secrets, tests, coverage, and build tooling from runtime
  • Support API/worker entrypoints and health checks
  • Scan dependencies and test startup/shutdown

Acceptance Criteria

  • Image starts with runtime-only dependencies
  • Container runs non-root and contains no env secrets
  • No unresolved critical scan finding remains
  • Health and shutdown tests pass

Verification Evidence

  • Attach image size/digest, user inspection, scan, and smoke test

Difficulty

Advanced

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions