Skip to content

path

Terminal window
turnout path <add|list|show|edit|remove> [...]

A path is a named directory on a server, plus the command to run after writing to it. Like credentials, paths are free-standing: the same web root usually exists on the staging box and the production one, and the post-write command belongs to the directory’s role rather than to any one machine.

A server points an app at a path by name:

Terminal window
turnout path add wwwroot --dir /var/www/myapp --restart "systemctl restart myapp"
turnout server edit prod --deploy-path myapp=wwwroot
turnout server edit staging --deploy-path myapp=wwwroot # the same path, reused
Terminal window
turnout path add [NAME] [--dir DIR] [--restart CMD]
Flag Short Description
--dir -d Absolute directory on the server
--restart -r Command to run on the server after writing here

With NAME or --dir missing, an interactive wizard asks for each field.

The directory is on the server, so it must be absolute. Both kinds are accepted, matching the servers the path is used on:

Terminal window
turnout path add wwwroot --dir /var/www/myapp # POSIX server
turnout path add winroot --dir "C:\inetpub\wwwroot\myapp" # Windows server

A relative path is refused rather than stored. See Windows servers for what else changes against a Windows target.

Terminal window
turnout path list # one line per path: name, directory, post-write command
turnout path show wwwroot # full card, plus which server/app pairs deploy into it

Omit the name on a terminal and turnout offers a picker.

Terminal window
turnout path edit wwwroot --dir /srv/www/myapp
turnout path edit wwwroot --restart "systemctl reload nginx"
turnout path edit wwwroot --restart "" # run nothing after writing
turnout path edit wwwroot # interactive wizard
Flag Short Description
--dir -d Absolute directory on the server
--restart -r Post-write command (empty value removes it)

Editing a path changes it for every server that uses it - which is the point, and worth remembering before widening one.

Terminal window
turnout path remove wwwroot [--yes]

Server/app pairs that deployed into it are listed before the confirmation and unlinked afterwards. The directory on the server is never touched - turnout stops tracking the name, nothing more.