Skip to main content

Seed CI/CD Setup

This guide covers setting up Seed for B4M deployments.

Prerequisites​

  • Seed account
  • GitHub repository access
  • AWS account with appropriate permissions

Create Seed App​

  1. Log in to Seed Dashboard
  2. Click Add an App
  3. Link GitHub:
    • Select your organization
    • Choose your fork repository (and b4m-core if separate)
  4. Configure Service:
    • Path: /
    • Type: SST
    • Service name: bike4mind
  5. Click Add Service

Configure AWS IAM​

  1. In Seed, click "Help me create an IAM role"
  2. For both dev and prod environments:
    • Click Create an IAM Role using CloudFormation
    • Select the correct AWS region
    • Check the Acknowledgment under Capabilities
    • Click Create Stack
  3. Wait for CloudFormation to complete

Environment Variables​

Navigate to each environment (dev, prod) and set:

Required Variables​

VariableDescriptionExample
SERVER_DOMAINYour domainyourdomain.com
PREVIEW_DOMAINPreview builds domainpreview.yourdomain.com
HOSTED_ZONERoute53 hosted zoneyourdomain.com
VPC_IDYour VPC IDvpc-1234abcd

Optional Variables​

VariableDescriptionDefault
APP_CERT_ARNCustom SSL certificate ARNAuto-generated
FAB_FILES_BUCKET_NAMEKnowledge files bucketAuto-created
GENERATED_IMAGES_BUCKET_NAMEAI images bucketAuto-created
APP_FILES_BUCKET_NAMEApp files bucketAuto-created
ENABLE_BUCKET_VERSIONINGEnable S3 versioningfalse
ENABLE_WARMINGLambda warmingfalse
ECR_CACHE_REPOECR repository for Docker cacheRequired

Auto-Set by Seed​

These are automatically configured:

  • SEED_APP_NAME
  • SEED_STAGE_NAME
  • CI=true

Configure Secrets​

In Seed, go to Settings > Secrets for each stage and add:

MONGODB_URI=mongodb+srv://...
SESSION_SECRET=<generated>
JWT_SECRET=<generated>
MAIL_HOST=...
MAIL_PORT=...
MAIL_USERNAME=...
MAIL_PASSWORD=...
MAIL_FROM=...

See Secrets Reference for the complete list.

Deployment Workflow​

ActionTrigger
Push to mainDeploys to dev stage
Push to prodDeploys to production stage
PR createdCreates preview environment
PR mergedRemoves preview environment

Monitoring​

Seed provides:

  • Deployment logs
  • Build history
  • Environment variables management
  • Rollback capability

Access via the Seed dashboard at console.seed.run.

Troubleshooting​

Build Fails with Route53 Error​

Cause: Route53 hosted zone not accessible or misconfigured

Fix:

  1. Verify HOSTED_ZONE environment variable matches your Route53 zone domain name exactly
  2. Verify the hosted zone exists in the target AWS account
  3. Verify IAM role has route53:ListHostedZonesByName permission

IAM Permission Errors​

Cause: IAM role missing permissions

Fix: Recreate the IAM role via CloudFormation with correct capabilities

Lambda Deployment Timeout​

Cause: Large bundle or slow network

Fix: Increase Seed timeout settings or optimize bundle size

Next Steps​

After Seed setup:

  1. Configure domain - Custom domain and OAuth
  2. Set up email - Platform email configuration
  3. Verify deployment - Test all functionality