Download the PHP package heimrichhannot/deployer-recipes without Composer

On this page you can find all versions of the php package heimrichhannot/deployer-recipes. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package deployer-recipes

deployer-recipes

Deployer recipes used at Heimrich & Hannot GmbH.

Install

To use our recipes, require this package with composer.

It is not required to install Deployer separately, but you may do so with the following command.

Usage with Contao 4.13+

Create a deploy.php file in your Contao project root directory and customize the following content according to your needs.

Setup of multiple hosts or environments

You may set up multiple hosts or environments by using the host() function multiple times. If you do not specify selectors (like labels) when running your deployer commands, you will be asked to choose which hosts to run that command for.

If you want to set common variables for all hosts, use the provided proxy function broadcast(), to call any number of methods on all previously defined hosts.

[!IMPORTANT] Make sure to use labels to differentiate between environments when defining multiple hosts.

Alternatively, you may iterate over all hosts:

getHosts() is a shorthand for Deployer::get()->hosts.

[!NOTE] This documentation might change in the future as there might be a better way to achieve this. Keep yourself posted.

The alias placeholder

Depending on your setup, you may want to automatically place different environments on the same host in respective directories. You can use the {{alias}} placeholder to differentiate between the hosts' aliases as environment names.

For example:

Utility Commands

Clear the cache on the remote server

Clear opcache

Deploy assets only (encore build folder)

Database actions

Action Command
Clone remote database to local
dep db:pull
Push local database to remote
dep db:push
Export remote database
dep db:export:remote
Export local database
dep db:export:local
Import database on remote
dep db:import:remote
Import database locally
dep db:import:local

You may alternatively use its alias dep db:clone for dep db:pull.

What to do when mysql or mysqldump is unavailable

You can change the pull and push commands to use the contao:backup commands instead of mysql and mysqldump:

[!NOTE] This will only work if your local and remote databases are compatible.

Contao-Manager automated Deployment

Contao-Manager is set to deploy automatically by default. If you prefer to disable this automatic deployment, you can configure the following variable in your deployment script:

Contao-Manager will download the latest version of the Contao-Manager phar file and deploy it to {{deploy_path}}/shared/{{public_dir}}/contao-manager.phar.php. After that, it will be symlinked to {{release_or_current_path}}/{{public_dir}}/contao-manager.phar.php.

If it already exists, it will perform a self-update.

Conditional Deployment

Automated deployment of Contao-Manager will not proceed if there is a file named contao-manager.phar.php present in your shared_files.

An example in which automated deployment is skipped:

This way, if you don't want the remote host to automatically fetch Contao-Manager from the internet, you can set up your shared files accordingly and don't need to touch contao_manager_deploy.

Sourcing Contao-Manager from a different location

If you want to change the source URL of contao-manager.phar, e.g., if you host your own Contao-Manager mirror, you can set the following variable:

Adding Symlinks

You can add symlinks to your deployment by using the symlinks configuration variable.

The link path is relative to the {{release_or_current_path}} directory.

To regenerate symlinks after deployment, you can use the following command:

Work in Progress

These templates are still work in progress and not yet fully implemented. Use with caution or not at all.


All versions of deployer-recipes with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
ext-json Version *
deployer/deployer Version ^7.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package heimrichhannot/deployer-recipes contains the following files

Loading the files please wait ....