shopen-group / satis-hook
Requires
- php: ^7.1
- monolog/monolog: ^1.24
- nette/http: ^2.4
- symfony/console: ^4.1
- symfony/finder: ^4.1
- symfony/process: ^4.1
- symfony/yaml: ^4.1
Requires (Dev)
- phpstan/phpstan: ^0.10.0
- phpunit/phpunit: ^7
- symplify/easy-coding-standard: ^3.2.30
This package is not auto-updated.
Last update: 2025-06-15 14:18:30 UTC
README
Simple app for rebuilding composer/satis via webhook.
- No database required
Install
Install composer package
composer require shopen-group/satis-hook dev-develop
Create config
# config.yaml secret: enabled: true # secret token is enabled location: param # location of "secret" parameter (param|header) value: veslo # secret value name: key # secret parameter name satis: php: /usr/bin/php bin: ../satis/bin/satis config: ../satis.json output: ../web
Create entrypoint
Our entrypoint will be hook.php
which is publicly accessible via HTTP.
ApplicationFactory::createApplication has three parameters. You can customise the first two of them.
- path to config.yaml
- path to writable TEMP folder (for storing requests)
<?php declare(strict_types=1); require_once __DIR__ . '/vendor/autoload.php'; use ShopenGroup\SatisHook\ApplicationFactory; $application = ApplicationFactory::createApplication(__DIR__ . '/config.yaml', __DIR__ . '/temp', __DIR__ . '/logs', $argc); $application->run();
Usage
Webhook
The app is accepting GET and POST requests through https://127.0.0.1/hook.php
.
There is an optional parameter "build-all". If the "build-all" parameter is present in request you can build all packages not necessarily just one particular package (http:/127.0.0.1/hook.php?repository=package/name
).
Queue process
There is a second "layer" of application - queue processing. To start processing accepted requests you have to run command below via CLI.
php hook.php satis-hook:build
We use supervisord to keep queue processing up.