https://github.com/ohdearapp/laravel-forge-sync
Sync Laravel Forge sites with Oh Dear!
https://github.com/ohdearapp/laravel-forge-sync
forge laravel monitoring ohdear php sync
Last synced: 9 months ago
JSON representation
Sync Laravel Forge sites with Oh Dear!
- Host: GitHub
- URL: https://github.com/ohdearapp/laravel-forge-sync
- Owner: ohdearapp
- License: mit
- Archived: true
- Created: 2018-01-17T23:09:57.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-11-09T22:51:19.000Z (over 7 years ago)
- Last Synced: 2024-09-29T09:08:38.944Z (almost 2 years ago)
- Topics: forge, laravel, monitoring, ohdear, php, sync
- Language: PHP
- Homepage: https://ohdearapp.com
- Size: 84 KB
- Stars: 5
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
**THIS PACKAGE HAS BEEN ABANDONED, DO NOT USE**
# Import Laravel Forge sites to Oh Dear!
[](https://travis-ci.org/ohdearapp/laravel-forge-sync)
[](https://styleci.io/repos/117903870)
[](https://scrutinizer-ci.com/g/ohdearapp/laravel-forge-sync)
[](https://packagist.org/packages/ohdearapp/laravel-forge-sync)
This package allows you to easily import your [Laravel Forge](https://forge.laravel.com) sites to your [Oh-Dear! App](https://ohdear.app) account.

At the moment it will only import sites from Forge to Oh Dear!
## Installation
You can install the package via composer:
```bash
composer require ohdear/forge-sync
```
You must publish the configuration file with:
``` bash
php artisan vendor:publish --provider="OhDear\ForgeSync\ForgeSyncServiceProvider"
```
This is the content of the file that will be published at `config/forge-sync.php`. You should provide an Oh Dear! API token and a Forge API token.
```` php
return [
/*
* An Oh Dear! API token.
*
* Learn how to get an API token at the Oh Dear! docs
* https://ohdear.app/docs/api/authentication
*/
'ohdear_api_token' => '',
/*
* A Forge API token.
*
* You can create an API token here:
* https://forge.laravel.com/user/profile#/api
*/
'forge_api_token' => '',
];
````
## Usage
Run this command to start the import process. It will ask you which Forge sites should be imported to which Oh Dear! team.
``` bash
php artisan ohdear:forge-sync
```
Alternatively you could also run this piece of code:
``` php
use OhDear\ForgeSync\ForgeSync;
use OhDear\ForgeSync\Site;
$forgeSync = new ForgeSync(
$ohDearTeamId,
$ohDearApiToken,
$forgeApiToken
);
$forgeSync->sites()->each(function(Site $site) {
$forgeSync->addToOhDear($site);
});
```
### Skipping sites
If you have a site on Forge that you do not wish to import into Oh Dear! simply add this line to the Nginx config of that site.
```
#OH-DEAR-DO-NOT-MONITOR
```
### Testing
``` bash
composer test
```
### Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.
## Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
### Security
If you discover any security related issues, please email support@ohdear.app instead of using the issue tracker.
## Credits
- [Lukas Kämmerling](https://github.com/LKDevelopment)
- [Freek Van der Herten](https://github.com/freekmurze)
- [All Contributors](../../contributors)
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.