PHPackages                             68publishers/health-check-microservice - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. 68publishers/health-check-microservice

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

68publishers/health-check-microservice
======================================

Health check microservice.

v0.1.2(4y ago)03MITPHPPHP ^7.4

Since Aug 9Pushed 4y ago1 watchersCompare

[ Source](https://github.com/68publishers/health-check-microservice)[ Packagist](https://packagist.org/packages/68publishers/health-check-microservice)[ RSS](/packages/68publishers-health-check-microservice/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (3)Dependencies (10)Versions (4)Used By (0)

Health check microservice
=========================

[](#health-check-microservice)

[![Total Downloads](https://camo.githubusercontent.com/0a35c89e1de64fc378db83eeb0e9e833ffb2e6505e440ef9bca84d50c4582433/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f36387075626c6973686572732f6865616c74682d636865636b2d6d6963726f736572766963652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/68publishers/health-check-microservice)[![Latest Version on Packagist](https://camo.githubusercontent.com/93058290b0ca6d979623c960b8324e014a5acdd9721f765b68ef5a26bfac57d5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f36387075626c6973686572732f6865616c74682d636865636b2d6d6963726f736572766963652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/68publishers/health-check-microservice)

💗 Really simple [Nette](https://nette.org) application based on our package [68publishers/health-check](https://github.com/68publishers/health-check)

The application can be used as a standalone microservice or can be used directly from your main application.

Standalone usage
----------------

[](#standalone-usage)

Firstly simply download the package:

```
$ git clone https://github.com/68publishers/health-check-microservice.git
$ cd health-check-microservice
```

### Installation with included docker-compose

[](#installation-with-included-docker-compose)

Install the application using the following script:

```
$ ./installer
```

Once the installation is successful you can edit the [ENV variables](#env-variables) in a file `.env`.

Then open a file `config/health_check_service_checkers.neon` and modify definitions of a service checkers according to own requirements.

Now open this URL in a browser `http://localhost:8888` respectively `http://localhost:8888/{HEALTH_CHECK_URL_PATH}`.

### Installation without Docker

[](#installation-without-docker)

Requirements:

- Webserver (Apache/Nginx)
- PHP 7.4
- Composer

```
$ composer install
$ cp .env.dist .env
$ cp config/health_check_service_checkers.neon.dist config/health_check_service_checkers.neon
```

Open the file `config/health_check_service_checkers.neon` and modify definitions of service checkers according to your own requirements. You can pass parameters directly into the definition, of course. Usage of the ENV variable for service checkers is not necessary.

Also open the file `.env` where you can edit the [ENV variables](#env-variables). Variables for services like `postgres`, `redis` etc. can be removed if not used.

Usage inside another application
--------------------------------

[](#usage-inside-another-application)

Run following command in your application

```
$ composer require 68publishers/health-check-microservice
```

Create NEON file with service checker definitions like in the standalone usage and declare the ENV variables:

```
HEALTH_CHECK_URL_PATH=/health
HEALTH_CHECK_ARRAY_EXPORT_MODE=full
HEALTH_CHECK_TEMP_DIR={{PATH TO TEMP DIR IN THE MAIN APPLICATION}}
HEALTH_CHECK_LOG_DIR={{PATH TO LOG DIR IN THE MAIN APPLICATION}}
HEALTH_CHECK_SERVICE_CHECKERS_CONFIG={{PATH TO CONFIG FILE IN THE MAIN APPLICATION}}
```

Then modify `index.php` in the application:

```
