Deploy Laravel for Bitbucket Pipelines
View on GitHub

Step 4: Fill in the variables

Fill in the variables in the bitbucket-pipelines.yml file:

The pipeline variables
  • base_directory

    This is the directory on the server that contains your project. More specifically, it is the directory that contains the "current" directory. For example:

    • If you set the base directory to "/var/www/project"
    • Then your webroot will be "/var/www/project/current/public"

    You can also use a tilde (~) as an alias for your home directory, for example: "~/project".

    If your project is already deployed but doesn't have a "current" directory yet (as in, your previous deployments didn't use a zero-downtime directory structure), just keep going. A later step will tell you how to migrate your current project.

    • ssh_user
    • ssh_host
    • ssh_port

    These three variables tell the script how to connect to your server.

  • php_executable

    This is the command that the deployment script will use the run PHP on your server. Most servers use the default "php" value. Servers configured with Laravel Forge might use an alias such as "php8.2" to run a specific version of PHP.