Skip to Content
New to Genbox? Check out our Getting Started guide

Profiles Configuration

Profiles define different environment configurations for various development scenarios.

Basic Profile

profiles: dev: description: Development environment size: medium apps: - frontend - backend

Full Profile Configuration

profiles: full-stack: # Metadata description: Complete development environment extends: base # Inherit from another profile # Resources size: large # Server size # Apps to include apps: - frontend - backend - worker # Connection configuration default_connection: local # Default for all connections connections: # Override specific connections frontend: api: local backend: mongodb: local redis: staging # Use staging Redis # Database settings database: mode: copy # copy, local, snapshot, remote source: staging # Source environment include: # Only these collections - users - products exclude: # Skip these collections - logs - sessions # Additional environment variables env: DEBUG: "true" LOG_LEVEL: debug # Git settings branch: develop # Default branch

Common Profile Patterns

Quick Development

Minimal setup for frontend work:

profiles: quick: description: Frontend only, use staging backend size: small apps: - frontend default_connection: staging

Full Stack

Complete local environment:

profiles: full: description: All apps with local everything size: large apps: - frontend - backend - worker default_connection: local database: mode: copy source: staging

Backend Only

For API development:

profiles: api-dev: description: Backend services only size: medium apps: - backend default_connection: local database: mode: copy source: staging

Testing

For integration testing:

profiles: test: description: Testing environment size: medium apps: - frontend - backend default_connection: local database: mode: local # Empty database env: NODE_ENV: test CI: "true"

Profile Inheritance

Use extends to build on other profiles:

profiles: base: size: medium apps: - backend default_connection: local with-frontend: extends: base apps: - frontend - backend # Include backend from base large-stack: extends: with-frontend size: large # Override just the size database: mode: copy source: staging

Inheritance chain: large-stack → with-frontend → base

Connection Overrides

Fine-tune connections per profile:

profiles: hybrid: description: Local backend, staging external services apps: - frontend - backend default_connection: local connections: frontend: api: local # Local API analytics: staging # Staging analytics backend: mongodb: local # Local database redis: local external-api: staging # Staging external API

Database Configurations

No Database

profiles: frontend-only: database: mode: none

Empty Local

profiles: fresh: database: mode: local # Empty MongoDB

Copy from Source

profiles: with-data: database: mode: copy source: staging # Copy from staging exclude: - audit_logs - sessions

From Snapshot

profiles: from-backup: database: mode: snapshot # Restore from backup

Remote Connection

profiles: staging-db: database: mode: remote # Connect to remote DB

Using Profiles

# Create with specific profile gb create my-env --profile full-stack # Override profile settings gb create my-env --profile quick --size medium # List available profiles gb profiles list # Show profile details gb profiles show full-stack # Compare profiles gb config diff quick full-stack

Default Profile

If no profile is specified, Genbox uses:

  1. Profile named default if it exists
  2. First profile in the list
  3. Built-in defaults
profiles: default: # This is used when no profile specified size: medium apps: - frontend - backend

Best Practices

  1. Name descriptively: Use names that explain the purpose
  2. Add descriptions: Document what each profile is for
  3. Use inheritance: Avoid duplicating configuration
  4. Keep it simple: Don’t over-engineer profiles
  5. Test profiles: Validate before using in production
Last updated on