From 44ad5935dc748b966ad04749b3120cd560ae5ead Mon Sep 17 00:00:00 2001 From: Alex Leonhardt Date: Mon, 13 Jul 2015 19:55:48 +0100 Subject: [PATCH] fix up dockerfile + permissions in /var/log --- Dockerfile | 8 +++++++- start-scripts/supervisord-docker.conf | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index e7c7e91..9dc27b1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,12 +7,18 @@ RUN yum -y update RUN mkdir -p /opt/sensu-grid -ADD . /opt/sensu-grid +ADD templates /opt/sensu-grid/templates +ADD static /opt/sensu-grid/static +ADD conf /opt/sensu-grid/conf +ADD requirements.txt /opt/sensu-grid/requirements.txt +ADD *.py /opt/sensu-grid/ +ADD docker-start.sh /opt/sensu-grid/docker-start.sh RUN pip install -r /opt/sensu-grid/requirements.txt RUN useradd -r sensu-grid RUN chown -R sensu-grid:sensu-grid /opt/sensu-grid RUN chmod 640 /opt/sensu-grid/conf/config.yaml && chmod 755 /opt/sensu-grid/docker-start.sh +RUN touch /var/log/sensu-grid.log && chown sensu-grid:sensu-grid /var/log/sensu-grid.log ADD start-scripts/supervisord-docker.conf /etc/supervisord.conf diff --git a/start-scripts/supervisord-docker.conf b/start-scripts/supervisord-docker.conf index b68b9ab..bca6240 100644 --- a/start-scripts/supervisord-docker.conf +++ b/start-scripts/supervisord-docker.conf @@ -46,7 +46,7 @@ stopwaitsecs=30 ; max num secs to wait before SIGKILL (default 10) user=sensu-grid ; setuid to this UNIX account to run the program log_stdout=true ; if true, log program stdout (default true) log_stderr=true ; if true, log program stderr (def false) -logfile=/var/log/sensu-grid.log ; child log path, use NONE for none; default AUTO +logfile=/var/log/supervisor/sensu-grid.log ; child log path, use NONE for none; default AUTO logfile_maxbytes=1000MB ; max # logfile bytes b4 rotation (default 50MB) logfile_backups=3 ; # of logfile backups (default 10)