1
0
mirror of https://github.com/rlister/dockerfiles.git synced 2025-12-12 17:26:15 +00:00

riemann-dash

This commit is contained in:
Richard Lister
2015-01-21 15:37:25 -05:00
parent 58637d65a5
commit b37f5747b0
3 changed files with 77 additions and 0 deletions

18
riemann-dash/Dockerfile Normal file
View File

@@ -0,0 +1,18 @@
FROM rlister/ruby:2.1.5
MAINTAINER Ric Lister, rlister@gmail.com
RUN DEBIAN_FRONTEND=noninteractive \
apt-get update && \
apt-get install -y \
ca-certificates
RUN gem install --no-rdoc --no-ri riemann-dash thin fog
WORKDIR /app
ADD config.rb /app/
EXPOSE 4567
CMD [ "riemann-dash" ]

22
riemann-dash/README.md Normal file
View File

@@ -0,0 +1,22 @@
# Riemann-Dash
[Riemann-Dash](https://github.com/aphyr/riemann-dash) is a
javascript, websockets-powered dashboard for
[Riemann](http://riemann.io/).
This dockerfile builds an S3-enabled image that can be configured
using environment variables. UI-configured dashboard settings can be
persisted in S3 and read by multiple riemann-dash containers.
This image also uses `thin` rather than `WEBrick`.
## Usage
```
docker run -it --name riemann-dash \
-e WS_CONFIG=s3://my-bucket/config.json \
-e AWS_ACCESS_KEY_ID=AECH8AEBUO0SHE7OOW9R \
-e AWS_SECRET_ACCESS_KEY=OU0BA6AEZU2EID4SHOHZ2FEITIL4UGOHXIU7AEX1 \
-p 4567:4567 \
rlister/riemann-dash
```

37
riemann-dash/config.rb Normal file
View File

@@ -0,0 +1,37 @@
# Example configuration file for riemann-dash.
# Serve HTTP traffic on this port
set :port, ENV.fetch('PORT', 4567)
# Answer queries sent to this IP address
set :bind, ENV.fetch('BIND', '0.0.0.0')
if ENV['RIEMANN_BASE']
riemann_base = ENV['RIEMANN_BASE']
riemann_src = "#{riemann_base}/lib/riemann/dash"
# Add custom controllers in controller/
config.store[:controllers] = ["#{riemann_src}/controller"]
# Use the local view directory instead of the default
config.store[:views] = "#{riemann_src}/views"
# Specify a custom path to your workspace config.json
config.store[:ws_config] = "#{riemann_base}/config/config.json"
# Serve static files from this directory
config.store[:public] = "#{riemann_src}/public"
end
# Save workspace configuration to Amazon S3 (you'll need to have the "fog"
# gem installed)
if ENV['WS_CONFIG']
config.store[:ws_config] = ENV['WS_CONFIG'] ## eg 's3://my-bucket/config.json'
end
if ENV['AWS_ACCESS_KEY_ID'] and ENV['AWS_SECRET_ACCESS_KEY']
config.store[:s3_config] = {
aws_access_key_id: ENV['AWS_ACCESS_KEY_ID'],
aws_secret_access_key: ENV['AWS_SECRET_ACCESS_KEY']
}
end