Some checks failed
Deploy Max Bot Test / deploy (push) Failing after 3s
- Slim 4 PSR-15 webhook, PHP-DI 7, Symfony Console 8 - 13 update handlers, 30+ command scenarios, all 7 button types - Composer pulls pkirillw/max-bot-api-php from GitHub vcs - Multi-stage Dockerfile (php-fpm 8.4-alpine) + nginx - docker-compose.yml targets server (npm_default external) - docker-compose.override.yml for local dev (gitignored) - .gitea/workflows/deploy.yml mirrors ghost-blog-bot pattern Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
20 lines
664 B
PHP
20 lines
664 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use Nyholm\Psr7\Factory\Psr17Factory;
|
|
use Pkirillw\MaxBotApi\Webhook\WebhookHandler;
|
|
use Psr\Http\Message\ResponseInterface;
|
|
use Psr\Http\Message\ServerRequestInterface;
|
|
use Slim\App;
|
|
|
|
return static function (App $app): void {
|
|
$app->post('/webhook', WebhookHandler::class);
|
|
|
|
$app->get('/health', function (ServerRequestInterface $request, ResponseInterface $response): ResponseInterface {
|
|
$payload = json_encode(['ok' => true, 'time' => date('c')], JSON_UNESCAPED_UNICODE);
|
|
$response->getBody()->write((string) $payload);
|
|
return $response->withHeader('Content-Type', 'application/json');
|
|
});
|
|
};
|