Categorygithub.com/b4nst/cobd
repositorypackage
1.0.0
Repository: https://github.com/b4nst/cobd.git
Documentation: pkg.go.dev

# README

cobd

Container toolbox to diagnose connection between databases, http services, etc...

Usage

docker run -p 80:80 -e TEST_HTTP_GITHUB="https://github.com/" banst/cobd:latest 
Starting up on port 80
Running 1 test(s)...
Passed   Http https://github.com/

This will spinup a webserver on port 80 by default.

Paths

  • / Whoami similar to containerous/whoami.
  • /test Run configured tests.
  • /env Display current env, only if COBD_ENABLE_ENV is set. Take extra care before exposing /env path publicly, as it could leak some critical informations (secrets, kube config, etc...).

Options

Options are given as env vars prefixed with COBD_

NameDescriptionDefault
COBD_PORTListening port.80
COBD_ENABLE_ENVEnable the /env path. Set to any value to enable.Unset

Test environment variables structure

Each test variable must start with COBD_T_

PatternDescriptionExpected value
COBD_T_REDISTest a connection to redisA redis connection string
COBD_T_SQL_[DRIVER]Test a connection to sql database. The driver should be one of a sql supported driverA sql connection string (check drivers for details)
COBD_T_HTTP_[NAME]Do a HEAD request to target. Succeed if the status code is >=200 && <400An http/https url, protocol included

SQL supported drivers