Skip to content

CodePipeline & Elastic Beanstalk

For plain CodePipeline -> Elastic Beanstalk deploys, the repo root now includes a prebuild hook at .platform/hooks/prebuild/00_select_deploy_service.sh.

Each Elastic Beanstalk environment must set APP_DEPLOY_TARGET to one of:

  • seedtrustapi
  • seedtrust_flask
  • app

During deployment, the hook projects that subdirectory into the staging root before the platform configures the app. This lets CodePipeline deploy the monorepo root artifact directly while each environment still boots from its own Procfile, .platform, Buildfile, and runtime files.

Suggested environment mapping:

  • API web -> APP_DEPLOY_TARGET=seedtrustapi
  • API worker -> APP_DEPLOY_TARGET=seedtrustapi, WORKER_ENV=1
  • Flask -> APP_DEPLOY_TARGET=seedtrust_flask
  • Next.js app -> APP_DEPLOY_TARGET=app

Notes:

  • Root .ebextensions/logging.config keeps CloudWatch log streaming enabled for direct repo-root deploys.
  • Root .ebextensions/nodejs.config sets NPM_USE_PRODUCTION=false so the app environment can install dev dependencies for next build.
  • buildspec.eb-package.yml is optional now; only use it if you want CodeBuild to package a service-specific artifact instead of deploying the repo root directly.