Skip to main content

Application Types

Setting type in your config.cap.yaml tells CAP what framework you are running, so it can fill in the parts of a deployment that follow from it:

type: laravel

Four things change when you set it:

  • Default services are created for you. Most types get a db service without declaring one, so a new application deploys with somewhere to store data. See Replacing a default service below.
  • Connections arrive under the names your framework already reads, so the stock configuration works unchanged. Each service documents its own variables per type; see Services.
  • Commands get their framework prefix. A worker command of queue:work runs as php artisan queue:work on Laravel, so you write the subcommand rather than the full command line.
  • Migrations and health checks have a default. Both can be overridden; see Other Properties and HTTP.

Everything on this page is a default. Anything you set explicitly wins.

PHP

Setting Value
Name php

A plain PHP application with no framework integration. Nothing is assumed about your code: write full commands, and declare any service you need.

PHP runtime settings are managed for you, on this type and every one that builds on it:

Variable Set when
PHP_MAX_UPLOAD_SIZE You define http.maxBodySize. Applies to the HTTP server.
PHP_MEMORY_LIMIT Always, as unlimited, for cronjobs, workers, migrations and the access container.
PHP_SESSION_SAVE_HANDLER, PHP_SESSION_SAVE_PATH http.session.connection names a Dragonfly service. Applies to the HTTP server.

laravel, symfony, cakephp and whmcs all build on this type, so everything above applies to them too. node and custom do not.

Laravel

Everything php does, plus the following.

Setting Value
Name laravel
Commands prefixed by php artisan
Migration php artisan migrate --force
Health check /up
Default services db (MariaDB)
Variable Value
APP_ENV The environment slug.
APP_URL Your application's primary hostname.

Symfony

Everything php does, plus the following.

Setting Value
Name symfony
Commands prefixed by php bin/console
Migration php bin/console doctrine:migrations:migrate --no-interaction
Health check /ping
Default services db (MariaDB)
Variable Value
APP_ENV prod.
DEPLOYMENT_ENV The environment slug.
APP_URL Your application's primary hostname.

Shopware

Everything symfony does, plus the following.

Setting Value
Name shopware
Migration sh -c /shopware-init.sh
Health check /api/_info/health-check
Default services db (MariaDB), queue (RabbitMQ), cache (Dragonfly)
Default HTTP resources 500m CPU, 1Gi memory

Two extra RabbitMQ connections, low_priority and failure, are created alongside the default one, because Shopware consumes three messenger transports.

If you define no cronjobs, a scheduler cronjob is created. If you define no workers, a worker worker is created. Defining either replaces the default.

Variable Value
APP_URL_CHECK_DISABLED 1.

CakePHP

Everything php does, plus the following.

Setting Value
Name cakephp
Commands prefixed by php bin/cake
Migration php bin/cake migrations migrate
Health check /ping
Default services db (MariaDB)
Variable Value
APP_FULL_BASE_URL Your application's primary hostname.

WHMCS

Everything php does, plus the following.

Setting Value
Name whmcs
Commands prefixed by php
Migration php -f secured_install/bin/installer.php -- -u -n -v
Health check /ping
Default services mysql (MariaDB)

Node.js

Setting Value
Name node
Commands prefixed by npm run
Migration npm run migrate
Health check /ping
Default services None
Variable Value
APP_ENV The environment slug.
APP_URL Your application's primary hostname.
NODE_ENV production.

Custom

Setting Value
Name custom

No framework assumptions and no default services. Write full commands, declare every service, and set the environment variables your application needs yourself.

Replacing a default service

A default is created only when you have declared nothing that serves the same purpose. What counts is the purpose, not the exact type: declaring any database replaces the default db, whatever kind of database it is.

type: laravel
services:
  pg:
    type: postgresql

That application gets pg and nothing else. The default db is not created, so you do not end up with an unused MariaDB alongside your PostgreSQL.

Default Replaced by declaring Types
db any database mariadb, mysql, postgresql, cockroachdb
cache any cache dragonfly
queue any queue rabbitmq

A shared service or an external connection of the same purpose counts too, so pointing at a shared database also stops the default being created.

Replacing one default leaves the others alone. A Shopware application that declares only a cache still gets its default db and queue.