Tony Mack | b995914 | 2016-03-12 14:13:24 +0000 | [diff] [blame^] | 1 | IP=`curl icanhazip.com` |
| 2 | IP=66.228.36.77 |
| 3 | SUBJECT="/C=US/ST=NY/O=Internet Widgits Pty Ltd/subjectAltName=IP:${IP}" |
| 4 | |
| 5 | .PHONY: certs |
| 6 | certs: ; [ ! -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 |
| 9 | build: ; docker build --rm -t logstash . |
| 10 | |
| 11 | .PHONY: run |
| 12 | run: ; 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 |
| 15 | stop: ; docker stop logstash_server |
| 16 | |
| 17 | .PHONY: rmcontainer |
| 18 | rmcontainer: ; docker rm logstash_server |