Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/m-adamski/symfony-deployer-bundle
Bundle for Symfony for easier Deployer configuration
https://github.com/m-adamski/symfony-deployer-bundle
deployer-bundle php symfony symfony-bundle
Last synced: 26 days ago
JSON representation
Bundle for Symfony for easier Deployer configuration
- Host: GitHub
- URL: https://github.com/m-adamski/symfony-deployer-bundle
- Owner: m-adamski
- License: mit
- Created: 2019-03-06T12:55:01.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-02-07T09:51:31.000Z (almost 5 years ago)
- Last Synced: 2024-04-20T19:51:19.576Z (7 months ago)
- Topics: deployer-bundle, php, symfony, symfony-bundle
- Language: PHP
- Homepage:
- Size: 31.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Deployer Bundle for Symfony
Bundle for Symfony for easier Deployer configuration.
This bundle is compatible with Symfony 4.1 and Symfony 5.0. Symfony 3.4 compatibility abandoned.
## Installation
This bundle can be installed by Composer:
```bash
$ composer require m-adamski/symfony-deployer-bundle
$ composer require deployer/deployer --dev
```## Deployer Configuration
In addition to installing this package, you must also create configuration files that it will use.
You can use the prepared script or create configuration files manually.**Automatically**
Run the command from the root project directory:
```bash
$ vendor/bin/create-config
```**Manually**
Create ``.deployer`` directory in your project's root directory. Then create four files in the newly added directory:
* config.php
* deployer.php
* hosts.php
* tasks.phpComplete the files with default values and then adapt them to your requirements.
``config.php``
```php
stage("production")
->user("deployer")
->identityFile(__DIR__ . "/.ssh/production/deployer_rsa")
->addSshOption("UserKnownHostsFile", "/dev/null")
->addSshOption("StrictHostKeyChecking", "no")
->set("php_version", "php7.2-fpm")
->set("deploy_path", "/var/www/vhosts/example.com")
->set("branch", "master");
`````tasks.php``
```php
desc("Restart PHP");task("deploy:writable:prepare", function () {
$dirs = join(" ", get("writable_dirs"));cd("{{ release_path }}");
run("echo '{{ sudo_password }}' | sudo -S setfacl -RL -m mask:rwX $dirs");
})->desc("Prepare writable");
```The last step is to make changes to the configuration files according to own needs.
## License
MIT