adt / deployment
Installs: 3 998
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 20
Forks: 0
Open Issues: 5
Requires
This package is not auto-updated.
Last update: 2022-05-10 22:59:01 UTC
README
- Git
- Composer
- Bower
- OP Cache (optional)
- APCu (optional)
- Redis (optional)
Installation & usage
- The best way to install is using Composer:
$ composer require adt/after-deploy
- Add this code in bootstrap.php before including autoload.php
include __DIR__ . '/../vendor/adt/after-deploy/src/AfterDeploy.php'; (new ADT\AfterDeploy\AfterDeploy()) ->runBase([ 'tempDir' => '/path/to/tempDir/', // required 'logDir' => '/path/to/logDir/', // required 'wwwDir' => '/path/to/wwwDir/', // optional, if not given, tempDir/../www is used, on 'key' => 'afterDeploy', // optional 'useMaintenance' => 1, // optional, default = 0 'sleep' => 1 // optional, time to wait before afterDeploy starts in seconds, if useMaintenance is 0 it's not used ] );
- Enable the extension in your neon config:
extensions: afterDeploy: ADT\AfterDeploy\DI\AfterDeployExtension
- Update deployment configuration file
deployment.ini
like:
after[] = http://example.com/?afterDeploy
- Run
dg/ftp-deployment
script
$ php private/vendor/dg/ftp-deployment/Deployment/deployment.php deployment.ini
- Optionally you can set the redis in neon config:
afterDeploy: redis: client: @redis.client # \Kdyby\Redis\RedisClient dbs: - 1 # clear db 1
- If you use BackgroundQueue >= v2.1.1, you can optionally set it in neon config:
afterDeploy: backgroundQueue: service: @backgroundQueue.service # \ADT\BackgroundQueue\Service
This will send a noop to currently running consumers, so they check if they should terminate. Telling the consumer to terminate on next check (by -m 1
or by sending SIGINT
signal) is not part of this component and is up to you.