From 67bf9eab352f7e0704e95fcd57ec08399f223161 Mon Sep 17 00:00:00 2001 From: Matthew Scragg Date: Fri, 26 Sep 2014 16:18:48 -0500 Subject: [PATCH] updated docker runsv script updated dockerfile --- docker/Dockerfile | 9 +++------ docker/realms-wiki.sh | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 7ea6b1b..c84a3f8 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -17,15 +17,9 @@ RUN bower --allow-root --config.cwd=/home/deploy/realms-wiki --config.directory= RUN virtualenv /home/deploy/realms-wiki/.venv RUN /home/deploy/realms-wiki/.venv/bin/pip install /home/deploy/realms-wiki -# Link to cli entry point -RUN ln -s /home/deploy/realms-wiki/.venv/bin/realms-wiki /usr/local/bin/realms-wiki && chmod +x /usr/local/bin/realms-wiki - # Logging RUN mkdir /var/log/realms-wiki && chown deploy.deploy /var/log/realms-wiki -# Hand over to deploy user -RUN chown -R deploy.deploy /home/deploy - # Upstart RUN mkdir /etc/service/realms-wiki ADD realms-wiki.sh /etc/service/realms-wiki/run @@ -34,4 +28,7 @@ RUN chmod +x /etc/service/realms-wiki/run # Clear some fat RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* +# Hand over to deploy user +RUN chown -R deploy.deploy /home/deploy + EXPOSE 5000 diff --git a/docker/realms-wiki.sh b/docker/realms-wiki.sh index 8fa50d8..48f9c72 100644 --- a/docker/realms-wiki.sh +++ b/docker/realms-wiki.sh @@ -6,4 +6,4 @@ if [ "${REALMS_WIKI_CONFIG}" != "" ]; then realms-wiki configure ${REALMS_WIKI_CONFIG} fi -exec /sbin/setuser deploy /home/deploy/realms-wiki/.venv/bin/python realms-wiki run >>/var/log/realms-wiki/realms-wiki.log 2>&1 +exec /sbin/setuser deploy /home/deploy/realms-wiki/.venv/bin/python manage.py run >>/var/log/realms-wiki/realms-wiki.log 2>&1