Skip to content
/ pghero Public

PgHero in Docker

License

Notifications You must be signed in to change notification settings

evemonk/pghero

Repository files navigation

pghero in Docker

RSpec DeepSource Ruby Style Guide

Service container for running pghero.

Configure

Environment variable Description Default Default in container
RAILS_ENV Rails environment development production
SECRET_KEY_BASE Rails secret not set not set
WEB_CONCURRENCY Number of CPU not set not set
RAILS_MAX_THREADS Rails max threads 3 as default
RAILS_MIN_THREADS Rails min threads 3 as default
DATABASE_URL Database configuration. Example: postgres://user:password@localhost/database not set not set
PGHERO_USERNAME User name for auth. Always set! not set not set
PGHERO_PASSWORD User password for auth. Always set! not set not set
PGHERO_STATS_DATABASE_URL When pghero_query_stats table in another database not set not set
PGHERO_LONG_RUNNING_QUERY_SEC Minimum time for long running queries. In seconds. 60 as default
PGHERO_SLOW_QUERY_MS Minimum average time for slow queries. In milliseconds. 20 as default
PGHERO_SLOW_QUERY_CALLS Minimum calls for slow queries 100 as default
PGHERO_EXPLAIN_TIMEOUT_SEC Statement timeout for explain. In seconds. 10 as default
PGHERO_TOTAL_CONNECTIONS_THRESHOLD Minimum connections for high connections warning 500 as default
PGHERO_CONFIG_PATH Path to config config/pghero.yml as default
PGHERO_FILTER_DATA Filter data not set as default

Example docker-compose.yml

# TODO: write