This is an official Docker image for sidekiq-prometheus-exporter gem.
It combines some approaches which were already published as images by other devs and at the same time brings more flexibility for the stock configuration and applies recommended Docker best practices.
Required
REDIS_URL
- RFC 3986 generic URI, exclusive withREDIS_HOST
REDIS_HOST
- a Redis host, exclusive withREDIS_URL
(default:localhost
)
Optional
REDIS_SSL
- a flag to enable Redis SSL URL scheme (default:false
)REDIS_PORT
- a Redis port (default:6379
)REDIS_USERNAME
- a Redis username (if you need one)REDIS_PASSWORD
- a Redis password (if you have it)REDIS_DB_NUMBER
- a Redis database number (default:0
)REDIS_NAMESPACE
- a Redis namespace name (if you have separated sidekiq)REDIS_SENTINELS
- a list of comma separated Redis urls (likeREDIS_URL
, but for sentinels)REDIS_SENTINEL_ROLE
- a role within the sentinel to connect (default:master
)REDIS_DISABLE_CLIENT_ID
- a flag to disableCLIENT
command in Sidekiq
💡 Note, that REDIS_URL
and REDIS_HOST
are exclusive. Since REDIS_HOST
is more
atomic value it will be checked after REDIS_URL
.
💡 REDIS_SENTINELS
will be parsed with URI
, because of that it's
mandatory for them to be formatted with protocol redis://...
.
💡 REDIS_DISABLE_CLIENT_ID
might be required if a SaaS Redis provider used.
If you don't have a running Redis instance, you can quickly spin an empty to practice.
$ docker run -d --rm --name redis-instance redis
and then run an exporter
$ docker run -it --rm \
--link redis-instance \
-p 9292:9292 \
-e REDIS_URL=redis://redis-instance \
strech/sidekiq-prometheus-exporter