Sign inSign up

omnisci/pg-mon

By omnisci

Updated over 5 years ago

Simple Flask-based python app returns status code based on connection to/query against a postgres db

Image
0

295

omnisci/pg-mon repository overview

PG-MON

Simple Flask-based python application that returns status code based on the result of a connection to and query against a postgres db.

Usage

The following custom values can be passed in as env vars

  • DB_NAME
  • DB_USER
  • DB_PASS
  • DB_HOST
  • DB_PORT
  • QUERY
  • TMP_FILENAME
  • PORT

Running in docker container

Build

Build the container from this directory with

docker build -t <image_name> .

With any <image_name>

Run

Run the container with

docker run <-e KEY=VALUE> -p 8080:8080 <image_name>

With <image_name> from the above step, and <-e> for any intended environment variables.

Running on system (non-containerized)

Deps

Install required packages from requirements.txt

Run

Run with python3 ./main.py. Prepend or set globally any env vars desired.

Tag summary

Content type

Image

Digest

Size

21.8 MB

Last updated

over 5 years ago

docker pull omnisci/pg-mon