Skip to content

ValeruS/docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Getting started

Tested on Debian 9 x64

  • Docker CE >= 18.03.1-ce
  • Docker Compose >= 1.21

Installation

Install Docker and Docker Compose

On linux make sure you have the last version of Docker Compose.

From cli go to your home directory

$ cd ~

Download archive file from github https://github.com/ValeruS/docker

Be sure you are in home directory

$ cd ~
$ wget https://github.com/ValeruS/docker/raw/master/workdir.tar.gz
$ tar -zxf workdir.tar.gz
$ cd workdir/

Build Containers:

$ docker-compose up -d

Containers:

- elasticsearch		:9200 :9300
- logstash		:9500
- kibana		:5601
- nginxnlb		:8080
- app1			:8081
- app2			:8082
- nginxsrv		:9090
- mysql			:3306
- httpd			:9080

Cherck container to be up and running

$ docker ps -a
    Name                   Command               State           Ports
-------------------------------------------------------------------------------
app1            node /usr/src/app/index          Up      0.0.0.0:8081->8080/tcp
app2            node /usr/src/app/index          Up      0.0.0.0:8082->8080/tcp
elasticsearch   /docker-entrypoint.sh elas ...   Up      9200/tcp, 9300/tcp
httpd           httpd-foreground                 Up      0.0.0.0:9080->80/tcp
kibana          /docker-entrypoint.sh kibana     Up      0.0.0.0:5601->5601/tcp
logstash        /docker-entrypoint.sh logs ...   Up      0.0.0.0:9500->9500/tcp
mysql           docker-entrypoint.sh mysqld      Up      0.0.0.0:3306->3306/tcp
nginxnlb        nginx -g daemon off;             Up      0.0.0.0:8080->80/tcp
nginxsrv        nginx -g daemon off;             Up      0.0.0.0:9090->80/tcp

Verifying if work:

  • nginxnlb load balancing. Upstream srv is app1 and app2 (execute command twice!)
$ curl http://localhost:8080
$ curl http://localhost:8080
  • nginxsrv (nginx installed from Dockerfile)
$ curl http://localhost:9090
$ curl http://localhost:9080
  • MySQL (mapped DB)
$ docker exec -it mysql bash
# mysql -umysql -pmysql
  mysql> select * from sample.EMPLOYEE;
  • ELK
  • Logstash TCP Input.
  • NOTE: You need to inject data into Logstash before being able to configure a Logstash index pattern via the Kibana web UI.
$ nc localhost 9500
testasdlfhafh
ctrl+C

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published