-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
FROM ubuntu:utopic | ||
MAINTAINER Avi Tzuel <[email protected]> | ||
|
||
ENV KIBANA_USER kibana | ||
ENV KIBANA_PASSWORD kibana | ||
ENV KIBANA_VERSION 4.1.1 | ||
|
||
RUN apt-get update && apt-get -y upgrade | ||
RUN apt-get -y install wget nginx-full apache2-utils supervisor && apt-get clean | ||
|
||
WORKDIR /opt | ||
RUN wget --no-check-certificate -O- https://download.elastic.co/kibana/kibana/kibana-$KIBANA_VERSION-linux-x64.tar.gz | tar xvfz - | ||
RUN mkdir /etc/kibana | ||
|
||
ADD ./templates/nginx/kibana /etc/nginx/sites-available/kibana | ||
ADD ./templates/supervisord.conf /etc/supervisor/conf.d/kibana.conf | ||
|
||
RUN rm /etc/nginx/sites-enabled/* | ||
RUN echo "daemon off;" >> /etc/nginx/nginx.conf | ||
|
||
EXPOSE 80 | ||
|
||
ADD run.sh ./run.sh | ||
RUN chmod +x ./run.sh | ||
CMD ./run.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
echo "HOSTNAME: $HOSTNAME" | ||
htpasswd -bc /etc/kibana/htpasswd ${KIBANA_USER} ${KIBANA_PASSWORD} | ||
ln -s /etc/nginx/sites-available/kibana /etc/nginx/sites-enabled/kibana | ||
sed -i "s/localhost:9200/es:9200/g" /opt/kibana-$KIBANA_VERSION-linux-x64/config/kibana.yml | ||
sed -i "s/kibana:5601/$HOSTNAME:5601/g" /etc/nginx/sites-enabled/kibana | ||
/usr/bin/supervisord -c /etc/supervisor/conf.d/kibana.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
server { | ||
listen 80; ## listen for ipv4; this line is default and implied | ||
listen [::]:80 default ipv6only=on; ## listen for ipv6 | ||
|
||
# Make site accessible from http://localhost/ | ||
server_name localhost; | ||
|
||
error_log /dev/stdout info; | ||
|
||
location = /health { | ||
return 200; | ||
access_log off; | ||
} | ||
|
||
location / { | ||
proxy_pass http://kibana:5601; | ||
proxy_read_timeout 90; | ||
|
||
auth_basic "Restricted"; | ||
auth_basic_user_file /etc/kibana/htpasswd; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[supervisord] | ||
nodaemon=true | ||
|
||
[program:kibana] | ||
command=/opt/kibana-4.1.1-linux-x64/bin/kibana | ||
autorestart=true | ||
|
||
[program:nginx] | ||
command=/usr/sbin/nginx | ||
autorestart=true |