Skip to content

dmarczydlo/docker-logger

Repository files navigation

Docker Logger

Application to display logs from dockers

Greenkeeper badge dependencies Status devDependencies Status Build Status Known Vulnerabilities

Getting started

  1. git clone [email protected]:dmarczydlo/react-starter.git
  2. yarn
  3. yarn start

Then application should work correctly on 3000 port in developer mode.

For correct work Docker Logger you have to serve docker.sock as json file with CORS. Nginx is one of the options for that.

Internal Nginx

  1. Install nginx on your system
  2. Configure nginx like below:
server {
         listen localhost:9000;
         location / {
                 add_header 'Access-Control-Allow-Origin' '*';
                 add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
                 proxy_pass http://unix:/var/run/docker.sock:/;
                 }
         }

Docker

If you do not want to install nginx please use dockers

  • docker-compose -f ./docker/docker-compose.yml up --build

Project include 2 different dockers:

  1. Nginx to serve Docker Logger on production mode. (port: 8081)
  2. Nginx to serve docker.sock

Adding servers

Current servers are defined in config.json Examples:

[
  {
    "NAME": "Server test1",
    "URL": "http://localhost:9000"
  },
  {
    "NAME": "Server test2",
    "URL": "http://localhost:9000"
  }
]