{"id":336064,"date":"2022-07-23T09:00:07","date_gmt":"2022-07-23T09:00:07","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=336064"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=336064","title":{"rendered":"<span>\u041f\u0440\u0430\u0433\u043c\u0430\u0442\u0438\u0447\u043d\u0430\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430-3: \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c-\u0431\u043e\u0442<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/001\/552\/a38\/001552a38be1c143e21ad20d4135df0c.jpg\" alt=\"\u0421\u043f\u0435\u0448\u043b\u0442\u0438-\u043a\u043e\u0444\u0435\u0435\u043d \u043d\u0430 \u041a\u0438\u043f\u0440\u0435 \u0441\u0442\u0430\u043b\u043e \u0435\u0449\u0451 \u0431\u043e\u043b\u044c\u0448\u0435\" title=\"\u0421\u043f\u0435\u0448\u043b\u0442\u0438-\u043a\u043e\u0444\u0435\u0435\u043d \u043d\u0430 \u041a\u0438\u043f\u0440\u0435 \u0441\u0442\u0430\u043b\u043e \u0435\u0449\u0451 \u0431\u043e\u043b\u044c\u0448\u0435\" width=\"1730\" height=\"1051\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/001\/552\/a38\/001552a38be1c143e21ad20d4135df0c.jpg\" data-blurred=\"true\"\/><figcaption>\u0421\u043f\u0435\u0448\u043b\u0442\u0438-\u043a\u043e\u0444\u0435\u0435\u043d \u043d\u0430 \u041a\u0438\u043f\u0440\u0435 \u0441\u0442\u0430\u043b\u043e \u0435\u0449\u0451 \u0431\u043e\u043b\u044c\u0448\u0435<\/figcaption><\/figure>\n<p>\u0424\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043f\u0440\u043e specialty-\u043a\u043e\u0444\u0435\u0439\u043d\u0438 \u043d\u0430 \u041a\u0438\u043f\u0440\u0435. \u0412 <a href=\"https:\/\/habr.com\/ru\/post\/677288\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/a> \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043b \u043f\u0440\u043e API \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441, \u0432\u043e <a href=\"https:\/\/habr.com\/ru\/post\/677534\/\" rel=\"noopener noreferrer nofollow\">\u0432\u0442\u043e\u0440\u043e\u0439<\/a> &#8212; \u043f\u0440\u043e \u0444\u0440\u043e\u043d\u0442\u044d\u043d\u0434-\u0441\u0430\u0439\u0442 \u0438 \u0442\u0435\u043f\u0435\u0440\u044c &#8212; \u043f\u0440\u043e \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c-\u0431\u043e\u0442\u0430.<\/p>\n<p>\u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u0434 \u0431\u043e\u0442\u043e\u043c \u0441\u0442\u0430\u0432\u0438\u043b\u0438\u0441\u044c \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438:<\/p>\n<ol>\n<li>\n<p><em>\/map<\/em> &#8212; \u043a\u0430\u0440\u0442\u0430 \u043a\u043e\u0444\u0435\u0435\u043d<\/p>\n<\/li>\n<li>\n<p><em>\/list<\/em> &#8212; \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u043e\u0444\u0435\u0435\u043d<\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043e \u043a\u043e\u0444\u0435\u0439\u043d\u0435<\/p>\n<\/li>\n<li>\n<p><em>\/random<\/em> &#8212; \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u0430\u044f \u043a\u043e\u0444\u0435\u0439\u043d\u044f<\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u0438\u0441\u043a \u043a\u043e\u0444\u0435\u0439\u043d\u0438 \u043f\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044e<\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u0438\u0441\u043a \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u0439 \u043a\u043e\u0444\u0435\u0439\u043d\u0438 \u043f\u043e \u0441\u0432\u043e\u0435\u043c\u0443 \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u0438\u043b\u0438 \u043f\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u0435 <em>\/nearest<\/em><\/p>\n<\/li>\n<\/ol>\n<p>\u0412 \u0445\u043e\u0434\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e Telegram \u043d\u0435 \u0443\u043c\u0435\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0443\u044e \u043a\u0430\u0440\u0442\u0443 \u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u043c\u0430\u0440\u043a\u0435\u0440\u0430\u043c\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 \u0432\u0435\u0431-\u0432\u0435\u0440\u0441\u0438\u0438. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u043c\u0435\u0441\u0442\u043e \u043a\u0430\u0440\u0442\u044b \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u0441\u0430\u0439\u0442 \u0441 \u043a\u0430\u0440\u0442\u043e\u0439, \u0430 \u043f\u0440\u0438 \u0432\u043c\u0435\u0441\u0442\u043e \u043e\u0442\u0432\u0435\u0442\u0430 \u043f\u0440\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 \u043f\u0443\u0441\u0442\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f &#8212; \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435-\u0437\u0430\u0433\u043b\u0443\u0448\u043a\u0443. \u0412\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c.<\/p>\n<p>\u041a\u043e\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 <a href=\"https:\/\/github.com\/specialtycoffeecyprus\" rel=\"noopener noreferrer nofollow\">\u043e\u0442\u043a\u0440\u044b\u0442<\/a>, \u0432\u0435\u043b\u043a\u0430\u043c \u0432 \u043f\u0443\u043b-\u0440\u0435\u043a\u0432\u0435\u0441\u0442\u044b. \u0410\u0434\u0440\u0435\u0441 \u0441\u0430\u0439\u0442\u0430 &#8212; \u0432 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0430\u0442\u044c\u0438.<\/p>\n<h3>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430<\/h3>\n<p>\u041f\u043e\u0441\u043b\u0435 &#171;\u0434\u043e\u043b\u0433\u0438\u0445 \u0438 \u0442\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0440\u0430\u0437\u0434\u0443\u043c\u0438\u0439&#187; \u043e\u0441\u043d\u043e\u0432\u043e\u0439 \u0431\u043e\u0442\u0430 \u0431\u044b\u043b\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 <a href=\"https:\/\/github.com\/nutgram\/nutgram:\" rel=\"noopener noreferrer nofollow\">Nutgram<\/a>: \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043b\u0451\u0433\u043a\u0430\u044f, \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0438 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f. \u0411\u043e\u043d\u0443\u0441\u043e\u043c \u0438\u0434\u0451\u0442 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 DI-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u0430\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0431\u044b\u0442\u044c \u043e \u0440\u0443\u0447\u043d\u043e\u0439 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0438 \u0438\u0445 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u044f\u043c.<\/p>\n<p>\u0410 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 PHP 8.1 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0447\u0443\u0442\u044c \u043c\u0435\u043d\u044c\u0448\u0435 \u043a\u043e\u0434\u0430 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0447\u0443\u0442\u044c \u0432\u044b\u0448\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c. Promoted properties, readonly \u0438 \u0441\u0442\u0440\u043e\u0433\u0430\u044f \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0431\u043b\u0435\u0433\u0447\u0430\u044e\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443.<\/p>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 composer&#8217;\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043e\u0431\u043b\u0435\u0433\u0447\u0435\u043d\u044b \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e API. \u0418\u0442\u043e\u0433\u043e\u0432\u044b\u0439 <a href=\"https:\/\/github.com\/specialtycoffeecyprus\/specialty-bot\/blob\/develop\/composer.json\" rel=\"noopener noreferrer nofollow\">composer.json<\/a>. <\/p>\n<p>\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0442 Telegram \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 \u043d\u0430 webhook endpoint \u0438 \u0440\u0430\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 \u0438 \u0442\u0438\u043f\u043e\u0432 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439. \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0442 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u043b\u0438 \u043e\u0431\u0440\u0430\u0449\u0430\u044e\u0442\u0441\u044f \u043a REST API \u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u043c\u0438. \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0435\u0441\u0442\u044c Fallback, Exception \u0438 ApiError-\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0434\u043b\u044f \u0432\u0441\u044f\u043a\u0438\u0445 \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u043e\u0441\u0442\u0435\u0439.<\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0445 single-action invokable-\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u043e \u0443\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432\u0441\u044e \u043b\u043e\u0433\u0438\u043a\u0443 \u0431\u043e\u0442\u0430 \u0432 23 \u0441\u0442\u0440\u043e\u043a\u0438!<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cc5\/edd\/915\/cc5edd91587c7bfe544c865416a3d0f7.png\" alt=\"\u0412\u043e\u0442 \u0438 \u0432\u0441\u044f \u043b\u043e\u0433\u0438\u043a\u0430\" title=\"\u0412\u043e\u0442 \u0438 \u0432\u0441\u044f \u043b\u043e\u0433\u0438\u043a\u0430\" width=\"1186\" height=\"508\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cc5\/edd\/915\/cc5edd91587c7bfe544c865416a3d0f7.png\"\/><figcaption>\u0412\u043e\u0442 \u0438 \u0432\u0441\u044f \u043b\u043e\u0433\u0438\u043a\u0430<\/figcaption><\/figure>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <em>\/nearest<\/em>:<\/p>\n<pre><code class=\"php\">&lt;?php  declare(strict_types=1);  namespace App\\Commands;  use App\\Contracts\\Command; use SergiX44\\Nutgram\\Nutgram; use SergiX44\\Nutgram\\Telegram\\Types\\Keyboard\\KeyboardButton; use SergiX44\\Nutgram\\Telegram\\Types\\Keyboard\\ReplyKeyboardMarkup; use SergiX44\\Nutgram\\Telegram\\Types\\Message\\Message;  final class NearestCommand implements Command {     public const SEND_TEXT = 'Send location';       public function __invoke(Nutgram $bot): ?Message     {         return $bot->sendMessage('Send your location to find the nearest coffee shop', [             'reply_markup' => ReplyKeyboardMarkup::make(resize_keyboard: true)->addRow(KeyboardButton::make(self::SEND_TEXT, request_location: true)),         ]);     }       public static function getName(): string     {         return 'nearest';     }       public static function getDescription(): string     {         return 'Show nearest specialty coffee shop';     } }<\/code><\/pre>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"php\">&lt;?php  declare(strict_types=1);  namespace App\\Handlers;  use App\\Services\\ApiService; use App\\Services\\Sender; use SergiX44\\Nutgram\\Nutgram; use SergiX44\\Nutgram\\Telegram\\Types\\Message\\Message;  final class LocationHandler {     public function __construct(private readonly ApiService $api, private readonly Sender $sender)     {     }       public function __invoke(Nutgram $bot): ?Message     {         $location = $bot->message()->location;          return $this->sender->sendItem(             $this->api->getNearest((string)$location->latitude, (string)$location->longitude), [                 'reply_markup' => ['remove_keyboard' => true],             ]         );     } }<\/code><\/pre>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043b\u0435\u0433\u0438\u0442\u0438\u043c\u043d\u043e\u0441\u0442\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u043b\u044f \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u044b\u0445 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0442\u0430\u043a\u0438\u0435 \u0436\u0435 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0435 \u0438 \u0451\u043c\u043a\u0438\u0435 <a href=\"https:\/\/github.com\/specialtycoffeecyprus\/specialty-bot\/tree\/develop\/app\/Middleware\" rel=\"noopener noreferrer nofollow\">middleware<\/a>.<\/p>\n<h3>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f<\/h3>\n<p>\u041e\u0431\u0449\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0441\u0435\u043a\u0440\u0435\u0442\u043e\u0432 &#8212; \u0432 .env, \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f &#8212; \u0432 .env.local<\/p>\n<h3>\u0422\u0435\u0441\u0442\u044b<\/h3>\n<p>\u041f\u043e\u043a\u0430 \u0440\u0443\u043a\u0430\u043c\u0438 \u00af_(\u30c4)_\/\u00af<\/p>\n<p>\u041d\u043e \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 Nutgram \u0435\u0441\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432, \u044d\u0442\u043e \u0440\u0430\u0434\u0443\u0435\u0442.<\/p>\n<h3>\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433<\/h3>\n<p><a href=\"https:\/\/docs.sentry.io\/platforms\/php\/\" rel=\"noopener noreferrer nofollow\">Sentry<\/a>, \u0432 .env \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0443\u0441\u0442\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 SENTRY_DSN (\u0434\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438), \u0430 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u0441\u0435\u043a\u0440\u0435\u0442.<\/p>\n<h3>\u0414\u0435\u043f\u043b\u043e\u0439<\/h3>\n<p>\u0412\u0441\u0451 \u0442\u0430 \u0436\u0435 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 <a href=\"http:\/\/Fly.io\" rel=\"noopener noreferrer nofollow\">Fly.io<\/a>, \u043d\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0441 <a href=\"https:\/\/fly.io\/docs\/reference\/machines\/\" rel=\"noopener noreferrer nofollow\">machines<\/a>, \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u044e\u0449\u0438\u043c\u0438\u0441\u044f \u0437\u0430 300ms. \u0412 \u043e\u0431\u0449\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e FaaS (serverless), \u043d\u043e \u0432 \u043c\u043e\u0451\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 php-\u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c &#8212; \u044d\u0442\u043e \u0432\u0441\u0451-\u0442\u0430\u043a\u0438 \u043e\u0431\u044b\u0447\u043d\u0430\u044f VM.<\/p>\n<p>\u0420\u0430\u0434\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 php-\u0441\u0435\u0440\u0432\u0435\u0440 \u0432\u043c\u0435\u0441\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u044f php-fpm + nginx\/caddy + supervisor. Docker-\u043e\u0431\u0440\u0430\u0437, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0441\u0442\u0430\u043b \u043c\u0435\u043d\u044c\u0448\u0435, \u043d\u043e \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0440\u043e\u0443\u0442\u0435\u0440:<\/p>\n<ol>\n<li>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430 \u0442\u043e\u043b\u044c\u043a\u043e POST-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u0431\u043e\u0442\u0430<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442\u0430 dev-\u0434\u043e\u043c\u0435\u043d\u0430 \u0432\u0438\u0434\u0430 .fly.dev \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0434\u043e\u043c\u0435\u043d<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0437\u0434\u0430\u0447\u0438 \u0441\u0442\u0430\u0442\u0438\u043a\u0438 (robots.txt, favicon.ico \u0438 \u0442.\u0434.)<\/p>\n<\/li>\n<li>\n<p>\u0411\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438 \u0432\u0441\u0435\u0445 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432<\/p>\n<\/li>\n<\/ol>\n<p>\u0418\u0442\u043e\u0433\u043e\u0432\u044b\u0439 <a href=\"https:\/\/github.com\/specialtycoffeecyprus\/specialty-bot\/blob\/develop\/app\/router.php\" rel=\"noopener noreferrer nofollow\">\u0440\u043e\u0443\u0442\u0435\u0440<\/a> \u0438 <a href=\"https:\/\/github.com\/specialtycoffeecyprus\/specialty-bot\/blob\/develop\/Dockerfile\" rel=\"noopener noreferrer nofollow\">Dockerfile<\/a> (\u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u0441\u043b\u043e\u0451\u043d\u044b\u0439 \u043a\u0430\u043a \u0432 API).<\/p>\n<h3>CI\/CD<\/h3>\n<p><a href=\"https:\/\/github.com\/specialtycoffeecyprus\/specialty-bot\/blob\/develop\/.github\/workflows\/deploy.yml\" rel=\"noopener noreferrer nofollow\">Github Action<\/a> \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442: \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c ID \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b \u0438\u0437 <code>flyctl machine list --json<\/code>, \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0435\u0451 <code>flyctl machine run --id &lt;id><\/code> \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044e \u0432\u0435\u0431\u0445\u0443\u043a\u0430 <code>curl -sS ${{ secrets.APP_URL }}\/setup.php<\/code>.<\/p>\n<p>\u0412\u0441\u0435 \u0441\u0435\u043a\u0440\u0435\u0442\u044b \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u043d\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 \u0445\u043e\u0441\u0442\u0438\u043d\u0433\u0430 \u0438 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u0434\u0443\u0431\u043b\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432 GitHub production Environment \u0434\u043b\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0432\u0435\u0431\u0445\u0443\u043a\u0430.<\/p>\n<p><strong>\u041d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0431\u043e\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0440\u0430\u0437\u043c\u0435\u0449\u0451\u043d \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u043d-\u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438 \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0432\u0441\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c. \u041f\u0440\u043e\u0435\u043a\u0442 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d \ud83d\ude42<\/strong><\/p>\n<p><a href=\"https:\/\/github.com\/specialtycoffeecyprus\/specialty-bot\" rel=\"noopener noreferrer nofollow\">\u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0431\u043e\u0442\u0430<\/a>, \u0441\u0430\u0439\u0442 <a href=\"https:\/\/specialtycoffee.cy\/\" rel=\"noopener noreferrer nofollow\">https:\/\/specialtycoffee.cy\/<\/a><\/p>\n<h3>TODO<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432 \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u043c\u043e\u0436\u043d\u043e:<\/p>\n<ul>\n<li>\n<p>\u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438<\/p>\n<\/li>\n<li>\n<p>health check&#8217;\u0438 \u043f\u043e \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u043c\u0443 \u043e\u0442\u0432\u0435\u0442\u0443 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432, \u0430 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e &#171;\u0436\u0438\u0432\u0443\u0447\u0435\u0441\u0442\u0438&#187; \u043f\u043e\u0440\u0442\u0430<\/p>\n<\/li>\n<li>\n<p>\u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0431\u043e\u0440\u043a\u0443 \u0441 Caddy<\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c Buildpack<\/p>\n<\/li>\n<li>\n<p>\u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 PHP-\u0441\u0435\u0440\u0432\u0435\u0440 \u0431\u043e\u0442\u0430 \u043d\u0430 \u0447\u0442\u043e-\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0435<\/p>\n<\/li>\n<li>\n<p>\u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u044e (Typescript)<\/p>\n<\/li>\n<li>\n<p>\u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f API<\/p>\n<\/li>\n<li>\n<p>\u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u043e\u0442\u0430<\/p>\n<\/li>\n<li>\n<p>\u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u0441\u0441\u044b\u043b\u043e\u043a \u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0432 Google Analytics<\/p>\n<\/li>\n<li>\n<p>\u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c Google Analytics \u043d\u0430 \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u043b\u0435\u0433\u0447\u0435 \u0438 \u0431\u043e\u043b\u0435\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 GDPR.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u0435\u043b\u043a\u0430\u043c \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438!<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/677594\/\"> https:\/\/habr.com\/ru\/post\/677594\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><figcaption>\u0421\u043f\u0435\u0448\u043b\u0442\u0438-\u043a\u043e\u0444\u0435\u0435\u043d \u043d\u0430 \u041a\u0438\u043f\u0440\u0435 \u0441\u0442\u0430\u043b\u043e \u0435\u0449\u0451 \u0431\u043e\u043b\u044c\u0448\u0435<\/figcaption><\/figure>\n<p>\u0424\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043f\u0440\u043e specialty-\u043a\u043e\u0444\u0435\u0439\u043d\u0438 \u043d\u0430 \u041a\u0438\u043f\u0440\u0435. \u0412 <a href=\"https:\/\/habr.com\/ru\/post\/677288\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/a> \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043b \u043f\u0440\u043e API \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441, \u0432\u043e <a href=\"https:\/\/habr.com\/ru\/post\/677534\/\" rel=\"noopener noreferrer nofollow\">\u0432\u0442\u043e\u0440\u043e\u0439<\/a> &#8212; \u043f\u0440\u043e \u0444\u0440\u043e\u043d\u0442\u044d\u043d\u0434-\u0441\u0430\u0439\u0442 \u0438 \u0442\u0435\u043f\u0435\u0440\u044c &#8212; \u043f\u0440\u043e \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c-\u0431\u043e\u0442\u0430.<\/p>\n<p>\u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u0434 \u0431\u043e\u0442\u043e\u043c \u0441\u0442\u0430\u0432\u0438\u043b\u0438\u0441\u044c \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438:<\/p>\n<ol>\n<li>\n<p><em>\/map<\/em> &#8212; \u043a\u0430\u0440\u0442\u0430 \u043a\u043e\u0444\u0435\u0435\u043d<\/p>\n<\/li>\n<li>\n<p><em>\/list<\/em> &#8212; \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u043e\u0444\u0435\u0435\u043d<\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043e \u043a\u043e\u0444\u0435\u0439\u043d\u0435<\/p>\n<\/li>\n<li>\n<p><em>\/random<\/em> &#8212; \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u0430\u044f \u043a\u043e\u0444\u0435\u0439\u043d\u044f<\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u0438\u0441\u043a \u043a\u043e\u0444\u0435\u0439\u043d\u0438 \u043f\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044e<\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u0438\u0441\u043a \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u0439 \u043a\u043e\u0444\u0435\u0439\u043d\u0438 \u043f\u043e \u0441\u0432\u043e\u0435\u043c\u0443 \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u0438\u043b\u0438 \u043f\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u0435 <em>\/nearest<\/em><\/p>\n<\/li>\n<\/ol>\n<p>\u0412 \u0445\u043e\u0434\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e Telegram \u043d\u0435 \u0443\u043c\u0435\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0443\u044e \u043a\u0430\u0440\u0442\u0443 \u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u043c\u0430\u0440\u043a\u0435\u0440\u0430\u043c\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 \u0432\u0435\u0431-\u0432\u0435\u0440\u0441\u0438\u0438. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u043c\u0435\u0441\u0442\u043e \u043a\u0430\u0440\u0442\u044b \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u0441\u0430\u0439\u0442 \u0441 \u043a\u0430\u0440\u0442\u043e\u0439, \u0430 \u043f\u0440\u0438 \u0432\u043c\u0435\u0441\u0442\u043e \u043e\u0442\u0432\u0435\u0442\u0430 \u043f\u0440\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 \u043f\u0443\u0441\u0442\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f &#8212; \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435-\u0437\u0430\u0433\u043b\u0443\u0448\u043a\u0443. \u0412\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c.<\/p>\n<p>\u041a\u043e\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 <a href=\"https:\/\/github.com\/specialtycoffeecyprus\" rel=\"noopener noreferrer nofollow\">\u043e\u0442\u043a\u0440\u044b\u0442<\/a>, \u0432\u0435\u043b\u043a\u0430\u043c \u0432 \u043f\u0443\u043b-\u0440\u0435\u043a\u0432\u0435\u0441\u0442\u044b. \u0410\u0434\u0440\u0435\u0441 \u0441\u0430\u0439\u0442\u0430 &#8212; \u0432 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0430\u0442\u044c\u0438.<\/p>\n<h3>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430<\/h3>\n<p>\u041f\u043e\u0441\u043b\u0435 &#171;\u0434\u043e\u043b\u0433\u0438\u0445 \u0438 \u0442\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0440\u0430\u0437\u0434\u0443\u043c\u0438\u0439&#187; \u043e\u0441\u043d\u043e\u0432\u043e\u0439 \u0431\u043e\u0442\u0430 \u0431\u044b\u043b\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 <a href=\"https:\/\/github.com\/nutgram\/nutgram:\" rel=\"noopener noreferrer nofollow\">Nutgram<\/a>: \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043b\u0451\u0433\u043a\u0430\u044f, \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0438 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f. \u0411\u043e\u043d\u0443\u0441\u043e\u043c \u0438\u0434\u0451\u0442 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 DI-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u0430\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0431\u044b\u0442\u044c \u043e \u0440\u0443\u0447\u043d\u043e\u0439 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0438 \u0438\u0445 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u044f\u043c.<\/p>\n<p>\u0410 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 PHP 8.1 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0447\u0443\u0442\u044c \u043c\u0435\u043d\u044c\u0448\u0435 \u043a\u043e\u0434\u0430 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0447\u0443\u0442\u044c \u0432\u044b\u0448\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c. Promoted properties, readonly \u0438 \u0441\u0442\u0440\u043e\u0433\u0430\u044f \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0431\u043b\u0435\u0433\u0447\u0430\u044e\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443.<\/p>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 composer&#8217;\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043e\u0431\u043b\u0435\u0433\u0447\u0435\u043d\u044b \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e API. \u0418\u0442\u043e\u0433\u043e\u0432\u044b\u0439 <a href=\"https:\/\/github.com\/specialtycoffeecyprus\/specialty-bot\/blob\/develop\/composer.json\" rel=\"noopener noreferrer nofollow\">composer.json<\/a>. <\/p>\n<p>\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0442 Telegram \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 \u043d\u0430 webhook endpoint \u0438 \u0440\u0430\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 \u0438 \u0442\u0438\u043f\u043e\u0432 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439. \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0442 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u043b\u0438 \u043e\u0431\u0440\u0430\u0449\u0430\u044e\u0442\u0441\u044f \u043a REST API \u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u043c\u0438. \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0435\u0441\u0442\u044c Fallback, Exception \u0438 ApiError-\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0434\u043b\u044f \u0432\u0441\u044f\u043a\u0438\u0445 \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u043e\u0441\u0442\u0435\u0439.<\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0445 single-action invokable-\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u043e \u0443\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432\u0441\u044e \u043b\u043e\u0433\u0438\u043a\u0443 \u0431\u043e\u0442\u0430 \u0432 23 \u0441\u0442\u0440\u043e\u043a\u0438!<\/p>\n<figure class=\"full-width\"><figcaption>\u0412\u043e\u0442 \u0438 \u0432\u0441\u044f \u043b\u043e\u0433\u0438\u043a\u0430<\/figcaption><\/figure>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <em>\/nearest<\/em>:<\/p>\n<pre><code class=\"php\">&lt;?php  declare(strict_types=1);  namespace App\\Commands;  use App\\Contracts\\Command; use SergiX44\\Nutgram\\Nutgram; use SergiX44\\Nutgram\\Telegram\\Types\\Keyboard\\KeyboardButton; use SergiX44\\Nutgram\\Telegram\\Types\\Keyboard\\ReplyKeyboardMarkup; use SergiX44\\Nutgram\\Telegram\\Types\\Message\\Message;  final class NearestCommand implements Command {     public const SEND_TEXT = 'Send location';       public function __invoke(Nutgram $bot): ?Message     {         return $bot->sendMessage('Send your location to find the nearest coffee shop', [             'reply_markup' => ReplyKeyboardMarkup::make(resize_keyboard: true)->addRow(KeyboardButton::make(self::SEND_TEXT, request_location: true)),         ]);     }       public static function getName(): string     {         return 'nearest';     }       public static function getDescription(): string     {         return 'Show nearest specialty coffee shop';     } }<\/code><\/pre>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"php\">&lt;?php  declare(strict_types=1);  namespace App\\Handlers;  use App\\Services\\ApiService; use App\\Services\\Sender; use SergiX44\\Nutgram\\Nutgram; use SergiX44\\Nutgram\\Telegram\\Types\\Message\\Message;  final class LocationHandler {     public function __construct(private readonly ApiService $api, private readonly Sender $sender)     {     }       public function __invoke(Nutgram $bot): ?Message     {         $location = $bot->message()->location;          return $this->sender->sendItem(             $this->api->getNearest((string)$location->latitude, (string)$location->longitude), [                 'reply_markup' => ['remove_keyboard' => true],             ]         );     } }<\/code><\/pre>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043b\u0435\u0433\u0438\u0442\u0438\u043c\u043d\u043e\u0441\u0442\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u043b\u044f \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u044b\u0445 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0442\u0430\u043a\u0438\u0435 \u0436\u0435 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0435 \u0438 \u0451\u043c\u043a\u0438\u0435 <a href=\"https:\/\/github.com\/specialtycoffeecyprus\/specialty-bot\/tree\/develop\/app\/Middleware\" rel=\"noopener noreferrer nofollow\">middleware<\/a>.<\/p>\n<h3>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f<\/h3>\n<p>\u041e\u0431\u0449\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0441\u0435\u043a\u0440\u0435\u0442\u043e\u0432 &#8212; \u0432 .env, \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f &#8212; \u0432 .env.local<\/p>\n<h3>\u0422\u0435\u0441\u0442\u044b<\/h3>\n<p>\u041f\u043e\u043a\u0430 \u0440\u0443\u043a\u0430\u043c\u0438 \u00af_(\u30c4)_\/\u00af<\/p>\n<p>\u041d\u043e \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 Nutgram \u0435\u0441\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432, \u044d\u0442\u043e \u0440\u0430\u0434\u0443\u0435\u0442.<\/p>\n<h3>\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433<\/h3>\n<p><a href=\"https:\/\/docs.sentry.io\/platforms\/php\/\" rel=\"noopener noreferrer nofollow\">Sentry<\/a>, \u0432 .env \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0443\u0441\u0442\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 SENTRY_DSN (\u0434\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438), \u0430 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u0441\u0435\u043a\u0440\u0435\u0442.<\/p>\n<h3>\u0414\u0435\u043f\u043b\u043e\u0439<\/h3>\n<p>\u0412\u0441\u0451 \u0442\u0430 \u0436\u0435 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 <a href=\"http:\/\/Fly.io\" rel=\"noopener noreferrer nofollow\">Fly.io<\/a>, \u043d\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0441 <a href=\"https:\/\/fly.io\/docs\/reference\/machines\/\" rel=\"noopener noreferrer nofollow\">machines<\/a>, \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u044e\u0449\u0438\u043c\u0438\u0441\u044f \u0437\u0430 300ms. \u0412 \u043e\u0431\u0449\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e FaaS (serverless), \u043d\u043e \u0432 \u043c\u043e\u0451\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 php-\u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c &#8212; \u044d\u0442\u043e \u0432\u0441\u0451-\u0442\u0430\u043a\u0438 \u043e\u0431\u044b\u0447\u043d\u0430\u044f VM.<\/p>\n<p>\u0420\u0430\u0434\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 php-\u0441\u0435\u0440\u0432\u0435\u0440 \u0432\u043c\u0435\u0441\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u044f php-fpm + nginx\/caddy + supervisor. Docker-\u043e\u0431\u0440\u0430\u0437, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0441\u0442\u0430\u043b \u043c\u0435\u043d\u044c\u0448\u0435, \u043d\u043e \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0440\u043e\u0443\u0442\u0435\u0440:<\/p>\n<ol>\n<li>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430 \u0442\u043e\u043b\u044c\u043a\u043e POST-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u0431\u043e\u0442\u0430<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442\u0430 dev-\u0434\u043e\u043c\u0435\u043d\u0430 \u0432\u0438\u0434\u0430 .fly.dev \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0434\u043e\u043c\u0435\u043d<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0437\u0434\u0430\u0447\u0438 \u0441\u0442\u0430\u0442\u0438\u043a\u0438 (robots.txt, favicon.ico \u0438 \u0442.\u0434.)<\/p>\n<\/li>\n<li>\n<p>\u0411\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438 \u0432\u0441\u0435\u0445 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432<\/p>\n<\/li>\n<\/ol>\n<p>\u0418\u0442\u043e\u0433\u043e\u0432\u044b\u0439 <a href=\"https:\/\/github.com\/specialtycoffeecyprus\/specialty-bot\/blob\/develop\/app\/router.php\" rel=\"noopener noreferrer nofollow\">\u0440\u043e\u0443\u0442\u0435\u0440<\/a> \u0438 <a href=\"https:\/\/github.com\/specialtycoffeecyprus\/specialty-bot\/blob\/develop\/Dockerfile\" rel=\"noopener noreferrer nofollow\">Dockerfile<\/a> (\u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u0441\u043b\u043e\u0451\u043d\u044b\u0439 \u043a\u0430\u043a \u0432 API).<\/p>\n<h3>CI\/CD<\/h3>\n<p><a href=\"https:\/\/github.com\/specialtycoffeecyprus\/specialty-bot\/blob\/develop\/.github\/workflows\/deploy.yml\" rel=\"noopener noreferrer nofollow\">Github Action<\/a> \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442: \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c ID \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b \u0438\u0437 <code>flyctl machine list --json<\/code>, \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0435\u0451 <code>flyctl machine run --id &lt;id><\/code> \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044e \u0432\u0435\u0431\u0445\u0443\u043a\u0430 <code>curl -sS ${{ secrets.APP_URL }}\/setup.php<\/code>.<\/p>\n<p>\u0412\u0441\u0435 \u0441\u0435\u043a\u0440\u0435\u0442\u044b \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u043d\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 \u0445\u043e\u0441\u0442\u0438\u043d\u0433\u0430 \u0438 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u0434\u0443\u0431\u043b\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432 GitHub production Environment \u0434\u043b\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0432\u0435\u0431\u0445\u0443\u043a\u0430.<\/p>\n<p><strong>\u041d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0431\u043e\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0440\u0430\u0437\u043c\u0435\u0449\u0451\u043d \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u043d-\u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438 \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0432\u0441\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c. \u041f\u0440\u043e\u0435\u043a\u0442 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d \ud83d\ude42<\/strong><\/p>\n<p><a href=\"https:\/\/github.com\/specialtycoffeecyprus\/specialty-bot\" rel=\"noopener noreferrer nofollow\">\u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0431\u043e\u0442\u0430<\/a>, \u0441\u0430\u0439\u0442 <a href=\"https:\/\/specialtycoffee.cy\/\" rel=\"noopener noreferrer nofollow\">https:\/\/specialtycoffee.cy\/<\/a><\/p>\n<h3>TODO<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432 \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u043c\u043e\u0436\u043d\u043e:<\/p>\n<ul>\n<li>\n<p>\u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438<\/p>\n<\/li>\n<li>\n<p>health check&#8217;\u0438 \u043f\u043e \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u043c\u0443 \u043e\u0442\u0432\u0435\u0442\u0443 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432, \u0430 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e &#171;\u0436\u0438\u0432\u0443\u0447\u0435\u0441\u0442\u0438&#187; \u043f\u043e\u0440\u0442\u0430<\/p>\n<\/li>\n<li>\n<p>\u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0431\u043e\u0440\u043a\u0443 \u0441 Caddy<\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c Buildpack<\/p>\n<\/li>\n<li>\n<p>\u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 PHP-\u0441\u0435\u0440\u0432\u0435\u0440 \u0431\u043e\u0442\u0430 \u043d\u0430 \u0447\u0442\u043e-\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0435<\/p>\n<\/li>\n<li>\n<p>\u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u044e (Typescript)<\/p>\n<\/li>\n<li>\n<p>\u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f API<\/p>\n<\/li>\n<li>\n<p>\u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u043e\u0442\u0430<\/p>\n<\/li>\n<li>\n<p>\u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u0441\u0441\u044b\u043b\u043e\u043a \u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0432 Google Analytics<\/p>\n<\/li>\n<li>\n<p>\u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c Google Analytics \u043d\u0430 \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u043b\u0435\u0433\u0447\u0435 \u0438 \u0431\u043e\u043b\u0435\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 GDPR.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u0435\u043b\u043a\u0430\u043c \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438!<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/677594\/\"> https:\/\/habr.com\/ru\/post\/677594\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-336064","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/336064","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=336064"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/336064\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=336064"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=336064"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=336064"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}