positivecodes/deployer

GIT/SVN deployer for Yii 2 apps.

Installs: 28

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 3

Forks: 2

Language:Shell

Type:script

3.4.2 2018-01-13 08:28 UTC

This package is auto-updated.

Last update: 2024-10-17 19:52:30 UTC


README

Deploys SVN/GIT version of Yii 2 project

SYNOPSIS

deployer -d TAG [-v] [-s] [-e ENV]
deployer -r TAG [-v] [-e ENV]
deployer -dev [-v] [-s] [-e ENV]
deployer -b BRANCH [-v] [-s] [-e ENV]
deployer -h
deployer -c
deployer -u

LOCAL INSTALLATION

Copy deployer to the project folder.

GLOBAL INSTALLATION

Run

composer global require positivecodes/deployer

and then

composer run-script post-update-cmd -d COMPOSER_VENDOR/positivecodes/deployer

where COMPOSER_VENDOR is the vendor composer folder. You can find it by running composer global config vendor-dir --absolute.

GLOBAL UPDATE

Run

deployer -u

CONFIGURATION

Run deployer -c to generate configuration file and set all variables there.

DESCRIPTION

Deploys the target TAG version of Yii 2 project or rollbacks to the target TAG version. Creates the releases and composer folders. Deployed version is stored in the releases folder under the TAG name. Composer folder stores the vendor folder with composer dependencies. TAG version is SVN-imported or GIT-cloned using provided credentials. Script deletes environments folder and runs migration.

If environment is set to Production composer runs with option --no-dev --optimize-autoloader.

Deployed or rollbacked version is symlinked to the Apache host target folder.

CONFIGURATION

Configuration can be stored in separate file deployer.cfg (in the same folder).

EVENTS

The following events are available for additional scripts:

  • BEFORE_START
  • AFTER_END
  • BEFORE_DOWNLOAD
  • AFTER_DOWNLOAD
  • BEFORE_DEPLOY
  • AFTER_DEPLOY
  • BEFORE_DEPLOYDEV
  • AFTER_DEPLOYDEV
  • BEFORE_INIT
  • AFTER_INIT
  • BEFORE_MIGRATE
  • AFTER_MIGRATE
  • BEFORE_UPDATE
  • AFTER_UPDATE
  • BEFORE_ROLLBACK
  • AFTER_ROLLBACK
  • BEFORE_INSTALL
  • AFTER_INSTALL
  • BEFORE_SWITCH
  • AFTER_SWITCH