Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

oslokommune/okctl-hello

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

A simple docker container exposing a http server on port 3000.

  • Supports http requests for testing routing
  • Supports Prometheus for testing scraping
  • Supports Postgres for testing database connectivity

API

Path Description
/health Returns OK
/metrics Exposes metrics which can be generated by accessing / and /logo.png
/postgres/read Returns an integer from a database
/postgres/write Bumps the integer returned by /postgres/read
/kill Kills the container. Adjust severity with param mode. Possible mode values: ["graceful", "", "panic"]

Configuration

Environment variables

  • Name: DSN
    Format: postgres://username:password@host:5432/dbName
    Example: postgres://bobs:youruncle@postgres-server:5432/ranch
    Description: A data source name(DSN) refering to a Postgres instance
  • Name: DEBUG
    Syntax: true | false
    Example: true 
    Description: Defaults to false. Set to true to enable debug logging.