blob: 9e042343a6eb484a2a8c14fd92381dc2d9d85da1 [file] [log] [blame]
Tony Mackdc981852016-03-12 14:13:24 +00001IP=`curl icanhazip.com`
2IP=66.228.36.77
3SUBJECT="/C=US/ST=NY/O=Internet Widgits Pty Ltd/subjectAltName=IP:${IP}"
4
5.PHONY: certs
6certs: ; [ ! -d certs ] && mkdir certs && cd certs && openssl req -x509 -batch -nodes -newkey rsa:2048 -keyout logstash-forwarder.key -out logstash-forwarder.crt
7
8.PHONY: build
9build: ; docker build --rm -t logstash .
10
11.PHONY: run
12run: ; docker run -d --link elasticsearch_server:elasticsearch -p 5043:5043 -p 514:514 -v `pwd`/certs:/opt/logstash/certs -v `pwd`/conf:/opt/logstash/conf --name logstash_server -i -t logstash
13
14.PHONY: stop
15stop: ; docker stop logstash_server
16
17.PHONY: rmcontainer
18rmcontainer: ; docker rm logstash_server