Skip to content

Deployment scripts

Open Site > Settings > Deployments to edit the commands that prepare the application. New sites use a managed script mode: Fluxo owns repository synchronization, release activation, service restarts, and cleanup, while the editor contains application-specific commands.

Managed script model

Write commands as though the current directory is the code being deployed. Fluxo sets that directory before executing the editor content.

For example, Laravel defaults include:

bash
if [ -f composer.json ]; then
  $FLUXO_COMPOSER install --no-dev --no-interaction --prefer-dist --optimize-autoloader
fi

if [ -f package.json ]; then
  (npm ci || npm install)
  npm run --if-present build
fi

if [ -f artisan ]; then
  $FLUXO_PHP artisan optimize:clear
  $FLUXO_PHP artisan storage:link
  $FLUXO_PHP artisan migrate --force
fi

Do not clone the repository, switch the current symlink, restart the managed Node service, or delete old releases in this editor. Those operations belong to the platform lifecycle.

Available variables

VariableMeaning
FLUXO_DOMAINPrimary site domain
FLUXO_SITE_PATHPersistent site root
FLUXO_ACTIVE_SITE_PATHCurrently active application path
FLUXO_DEPLOY_PATHDirectory whose code is being prepared
FLUXO_RELEASE_DIRECTORYNew release path during managed zero downtime
FLUXO_WEB_ROOTResolved web directory for this deployment
FLUXO_REPOSSH repository URL
FLUXO_BRANCHConfigured branch
FLUXO_PHP_VERSIONSite PHP version
FLUXO_PHPVersion-specific PHP executable
FLUXO_COMPOSERComposer invoked with the site PHP version
FLUXO_APP_TYPElaravel, php, wordpress, node, or html
FLUXO_APP_PORTInternal Node/Octane port when applicable

Node sites additionally receive package-manager, install, build, start, preset, mode, and static-output variables.

Shell behavior

Managed scripts execute with Bash strict error handling. A failed command stops the application phase and marks the deployment failed. Use explicit conditionals for optional files and commands.

Prefer Fluxo-provided PHP and Composer variables over bare php or composer so the command uses the site's configured PHP version.

Reset to managed defaults

Imported or older sites may show a complete legacy script. Fluxo preserves it unchanged to avoid rewriting user-owned behavior. The deployment settings page offers a reset action that replaces it with current application-specific defaults and re-enables the managed lifecycle.

Review custom persistence, build, and framework commands before resetting. Fluxo cannot infer every modification from a full legacy script.

WordPress

WordPress starts with an empty deployment script because it is installed and managed in place. Add a script only if you have a deliberate deployment process. A WordPress deploy action is rejected while the script is empty.

Fluxo website · Source-available under the BSL 1.1 License.