wanmigs/laravel-system-check 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

wanmigs/laravel-system-check

Composer 安装命令:

composer require wanmigs/laravel-system-check

包简介

A HTTP health check url that can be hit to perform basic application diagnostics

README 文档

README

  • implement a HTTP health check API that can be hit to perform basic application diagnostics
  • application instance health check
  • application release health check

Add Health Check Route to routes/web.php

use Fligno\System\SystemCheck;

SystemCheck::routes();

Routes URL

/system/application
/system/release

That's it for laravel setup. Below is the manual usage of the functions.

Manual Usage

Setup Health Check

use Fligno\System\SystemCheck;

$system = new SystemCheck();

Health Check API

$system->getStatus()

results :

{
    'status': 'OK'
    'timestamp': '2019-06-14T04:01:03Z00:00'
    'instance-id': '<hostname>'
}

$system->getPhpInfo()

Details :

  • php version
  • php component checks

results :

{
    'timestamp': '2019-06-14T04:01:03Z00:00'
    'instance-id': '<hostname>'
    'php-version': 'php7.2'
    'php-modules': [
        'mbstring',
        . . .
    ]
}

$system->getReleaseInfo()

Details :

  • information stored from build.json generated from CI build

Defining build.json path

Option 1

env GIT_BUILD_FILE_PATH

Option 2

$system->setBuildPath($path_to_build_json);

file resource :

build.json

{
    'start': '2019-06-14T04:01:03Z00:00'
    'end': '2019-06-14T04:01:03Z00:00',
    'status': 'SUCCESS',
    'branch': '<git-branch>',
    'release': '<git-relesae-tag>',
    'commit': '<git-commit-id>',
    'build': '<CI-build-id>'
    'config': '<configuration-id-from-CD>'
}

统计信息

  • 总下载量: 730
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: mit
  • 更新时间: 2019-10-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固