Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Jan 16, 2017
1 parent 074f54d commit 43bf6e2
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
"# test_supergr"
"# test_supergr"
autodeployer deploy.sh
11 changes: 11 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
cd docker-rsyslog-master && docker build . -t rsyslog.master
docker run -d --name rsyslog.master rsyslog.master

MASTER_IP=`docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' rsyslog.master`
sed -i s/tochange/$MASTER_IP/g ../docker-rsyslog-agent/hostslogs.conf
cd ../docker-rsyslog-agent && docker build . -t rsyslog.agent
docker run -d --name rsyslog.agent -v /var/log/nginx:/var/log/hosts rsyslog.agent

cd ../nginx-static-master && docker build . -t nginx.static
docker run -d --name nginx.static -v /var/log/nginx:/var/log/hosts -p 80:80 nginx.static
3 changes: 2 additions & 1 deletion docker-rsyslog-agent/hostslogs.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ $InputFileStateFile stat-nginx-access
$InputFileSeverity error
$InputFileFacility local3
$InputRunFileMonitor
local3.* @@172.17.0.2:514
local3.* @@tochange:514

Empty file modified docker-rsyslog-agent/start.sh
100644 → 100755
Empty file.
Empty file modified docker-rsyslog-master/start.sh
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions nginx-static-master/scripts/start.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ if [ ! -d "/var/www/html/.git" ]; then
fi
fi
chown -Rf nginx.nginx /var/www/html
chown nginx.nginx /var/logs/hosts
fi
fi

Expand Down

0 comments on commit 43bf6e2

Please sign in to comment.