https://github.com/jurios/deployer
Automatic configurable deployment. Easy and fast
https://github.com/jurios/deployer
continuous-delivery continuous-deployment deployment ftp php sftp
Last synced: 5 months ago
JSON representation
Automatic configurable deployment. Easy and fast
- Host: GitHub
- URL: https://github.com/jurios/deployer
- Owner: jurios
- Archived: true
- Created: 2019-06-01T05:35:46.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-12-09T16:31:56.000Z (over 6 years ago)
- Last Synced: 2025-07-07T05:18:59.459Z (12 months ago)
- Topics: continuous-delivery, continuous-deployment, deployment, ftp, php, sftp
- Language: PHP
- Homepage:
- Size: 107 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Deployer
[](https://travis-ci.com/jurios/deployer)
## 1 - Disclaimer
Deployer is an unattended script. However, in order to let you check the changes which Deployer is going to do, it will
print the change list and wait 15 seconds before start the process. If you see something unexpected, close the process.
What's more, Deployer can be launched with a `simulated mode` where it simulates the deployment process (no changes are
done in production) in order to let you check the files which are going to be modified/added/removed.
Please, consider fill an issue if you see a bug or an unexpected behaviour. That would be really useful
to make Deployer better.
## 2 - What's Deployer
Deployer is an unattended script which compares the production project version and the current version in order
to list the files changed (that means: new files, modified files and removed files) and upload/remove them in
the production environment using SFTP or FTP
(at this moment, SFTP and FTP are provided but more protocols can be added easily).
It uses git (your project must be included in a Git repository) to compare the versions. And parses the `composer.lock`
file in order to know which composer packages required by the project are new/updated/removed.
### 2.1 - BUILD file
In order to let Deployer know the production environment version, it will generate a file called `BUILD` in the production
environment which contains the commit reference. This file should be reachable for Deployer as it will try to download it
in the initial step of the deployment process.
If Deployer can't get this file, then it will compare from the first commit of the project
(That means, it will deploy all files tracked).
You can change that behaviour specifying the commit SHA reference manually when you call to Deployer. You can see this
in the `How to use it` section.
## 3 - Getting Started
Deployer has been designed to work in any PHP project.
If you are developing a Laravel project, a Laravel integration package is available
[here](https://github.com/jurios/laravel-deployer).
You can install deployer into your project with:
```
composer require kodilab/deployer dev-master
```
### How to use it
You can call to Deployer using a `deploy_it()` helper method. This is the signature of the function:
```(php)
deploy_it(string $project_path, array $config = [], string $from_commit = null)
```
* **project_path** is the path where the project is present
* **config** The configuration array. Explained in the next section.
* **from_commit(optional)** You can define a SHA commit reference instead of download it from the produccion environment.
This is an example of a script which launch Deployer:
```(php)