Skip to content

Configuration Options

A lookup table for .shippy.yaml. For explanations and examples, follow the links into the Configuration guide.

Top level

KeyTypeDescription
hostsmapOne entry per deployment target. The key is the name you pass to shippy deploy <name>.
commandslistCommands executed in the new release directory, before it goes live.
rollback_commandslistCommands executed when shippy rollback switches releases.
command_contextstringPrefix that every command is run inside, e.g. docker exec php85. Overridable per host and per command. See Deployment Commands.
lock_enabledboolDeployment locking, true by default. Overridable per host.
lock_timeoutintMinutes before a stale lock expires, 15 by default. Overridable per host.
backupmapSettings for shippy backup. Can be overridden per host.
include / excludelistCan also be set globally; a per-host list replaces the global one rather than merging. See File Selection.

hosts.<name>

Connection

KeyTypeDefaultDescription
hostnamestringServer domain or IP.
portint22SSH port. Top-level for convenience; other SSH settings live in ssh_options.
remote_userstringSSH username.
ssh_keystringauto-detectedPath to the SSH private key. Falls back to ~/.ssh/id_ed25519, ~/.ssh/id_rsa, ~/.ssh/id_ecdsa, plus any key held by a running ssh-agent. See SSH Connections.
ssh_optionsmapSSH configuration options, see below.
ssh_multiplexingboolfalseReuse one shared connection (ControlMaster) for all operations against the host. See SSH Multiplexing.

Deployment

KeyTypeDefaultDescription
deploy_pathstringAbsolute path on the server. Shippy creates current, releases/ and shared/ beneath it.
rsync_srcstringLocal source directory, usually ./.
keep_releasesint5How many releases to keep after cleanup — these are the ones you can roll back to.
command_contextstringinherits globalPer-host override of the command prefix.
lock_enabledbooltruePer-host override of deployment locking. See Deployment Locking.
lock_timeoutint15Per-host override of the stale-lock timeout, in minutes.

Files

KeyTypeDefaultDescription
sharedlistPaths symlinked from shared/ into every release. Trailing / marks a directory. See Shared Files/Directories.
includelistThe allowlist. Nothing is deployed unless it is listed here; a directory entry ships its whole subtree. See File Selection.
excludelistCarve-outs that win over include, on top of the built-in default excludes.

ssh_options

All values are strings. See SSH Options for details.

OptionDefaultDescription
ConnectTimeout30Connection timeout. Accepts seconds ("30") or a duration ("30s", "5m", "1h").
ServerAliveIntervalInterval between keepalive messages. Same formats as ConnectTimeout.
ServerAliveCountMax3Failed keepalives tolerated before disconnecting.
Compression"yes" / "true" / "no" / "false". Negotiated with the server.
StrictHostKeyChecking"yes", "accept-new" (recommended) or "no".
UserKnownHostsFile~/.ssh/known_hostsKnown hosts file, ~ is expanded.

commands and rollback_commands

See Deployment Commands for the full explanation.

KeyTypeDescription
namestringDescription shown in the deployment output.
runstringCommand executed in the new release directory.
onlylistRun only for these host names. Omit both only and except to run everywhere.
exceptlistRun everywhere except these host names. Wins over only if a host matches both.
command_contextstringPer-command override of the container prefix. "" forces the command to run directly on the host.
yaml
commands:
  - name: Clear TYPO3 cache
    run: ./{{config.bin-dir|vendor/bin}}/typo3 cache:flush

  - name: Database migrations
    run: ./{{config.bin-dir|vendor/bin}}/typo3 upgrade:run
    only:
      - production

backup

See shippy backup for the full annotated block.

KeyTypeDefaultDescription
outputstringcwdLocal directory the ZIP is written to.
fileslistPaths inside the remote shared/ directory to include.
database.credentialsstringautoauto, dotenv, typo3 or manual.
database.driverstringmysql, postgresql or sqlite. Required with credentials: manual.
database.host / .port / .name / .user / .passwordstring / intExplicit credentials, used with credentials: manual. Supports ${VAR} substitution.
database.exclude_tableslistGlob patterns for tables to skip in the dump.
database.optionsmapDBMS-specific options, e.g. single_transaction, charset (MySQL), schema (PostgreSQL).

Substitutions

Both forms work in any string value. See Template Variables and Environment Variables.

SyntaxSourceExample
{{key.path}}composer.json{{name}}, {{extra.typo3/cms.web-dir}}
{{key.path|fallback}}composer.json, with fallback{{config.bin-dir|vendor/bin}}
${VAR}environment${DEPLOY_HOST}
${VAR|fallback}environment, with fallback${DEPLOY_PATH|/var/www/html}

WARNING

An unset ${VAR} without a fallback fails the deployment.

Released under the MIT License.