Skip to content

Application Types

CAP provides specialized support for various application types and frameworks, simplifying configuration and deployment by setting sensible defaults, managing environment variables, and integrating with framework-specific tools. When you specify an application type in your config.cap.yaml, CAP automatically configures your deployment with these optimizations.

Available Application Types

PHP (php)

This type is a generic base for custom PHP applications or those without specific framework integrations.

  • Framework Binary: None (full commands must be provided).
  • Default Migration Command: None (full commands must be provided).
  • Job/Worker Commands: Subcommands are prefixed with php -d memory_limit=-1.
  • Environment Variables:
    • Automatically sets the upload_max_filesize and post_max_size PHP ini directives if http.maxBodySize is defined.
    • Automatically sets the session.save_handler and session.save_path PHP ini directives if a session connection to a Dragonfly service is configured.

Laravel (laravel)

  • Framework Binary: artisan
  • Default Migration Command: php -d memory_limit=-1 artisan migrate --force
  • Health Check Path: /up
  • Default Services: Automatically creates and connects to a MariaDB service.
  • Environment Variables:
    • APP_ENV: Automatically set to the environment slug.
    • APP_URL: Automatically set to the application's primary hostname.
    • DB_*: Connection details for various database services (MariaDB, PostgreSQL, CockroachDB, MySQL) are automatically configured with DB_ prefixed environment variables.
    • DB_CONNECTION: Automatically set to the type first database service defined.
    • QUEUE_CONNECTION: Set to rabbitmq when connected to a RabbitMQ service.
    • CACHE_STORE: Set to redis when connected to a Dragonfly service.

Symfony (symfony)

  • Framework Binary: bin/console
  • Default Migration Command: php -d memory_limit=-1 bin/console doctrine:migrations:migrate --no-interaction
  • Health Check Path: /ping
  • Default Services: Automatically creates and connects to a MariaDB service.
  • Environment Variables:
    • APP_ENV: Hardcoded to prod.
    • DEPLOYMENT_ENV: Automatically set to the environment slug.
    • APP_URL: Automatically set to the application's primary hostname.
    • MESSENGER_TRANSPORT_DSN: Set for RabbitMQ connections.
    • DATABASE_URL: The connection string for database services includes the serverVersion for compatibility.

Shopware (shopware)

This type includes all behaviors from the symfony type, with the following additions and overrides:

  • Framework Binary: bin/console
  • Default Migration Command: sh -c /shopware-init.sh
  • Health Check Path: /api/_info/health-check
  • Default Services: Automatically creates and connects to a MariaDB and RabbitMQ service.
  • Environment Variables:
    • APP_URL_CHECK_DISABLED: Set to 1.
  • Default Configurations:
    • If no cronjobs are defined, a default scheduler cronjob is automatically created.
    • If no workers are defined, a default async worker is automatically created.
    • Default HTTP resources are set to 500m CPU and 1Gi memory.

CakePHP (cakephp)

  • Framework Binary: bin/cake
  • Default Migration Command: php -d memory_limit=-1 bin/cake migrations migrate
  • Health Check Path: /ping
  • Default Services: Automatically creates and connects to a MariaDB service.
  • Environment Variables:
    • APP_FULL_BASE_URL: Automatically set to the application's primary hostname.
    • CACHE_*: Connection details for Dragonfly are prefixed with CACHE_, with special handling for the default connection.
    • MariaDB/MySQL connection strings are appended with additional CakePHP-specific parameters.

WHMCS (whmcs)

  • Framework Binary: None (relies on php directly).
  • Default Migration Command: php -d memory_limit=-1 -f secured_install/bin/installer.php -- -u -n -v
  • Health Check Path: /ping
  • Default Services: Automatically creates and connects to a MariaDB service.
  • Environment Variables:
    • MYSQL_*: Database connection details are set with MYSQL_ prefixed environment variables for MariaDB connections.

Node.js (node)

  • Framework Binary: npm
  • Default Migration Command: npm run migrate
  • Health Check Path: /ping
  • Job/Worker Commands: Subcommands are automatically prefixed with npm run.
  • Environment Variables:
    • APP_URL: Automatically set to the application's primary hostname.
    • NODE_ENV: Hardcoded to production.
    • APP_ENV: Automatically set to the environment slug.

Custom (custom)

This type is for applications that do not fit into any predefined categories.