updated docker runsv script

updated dockerfile
This commit is contained in:
Matthew Scragg 2014-09-26 16:18:48 -05:00
parent e7e2ecfc4d
commit 67bf9eab35
2 changed files with 4 additions and 7 deletions

View file

@ -17,15 +17,9 @@ RUN bower --allow-root --config.cwd=/home/deploy/realms-wiki --config.directory=
RUN virtualenv /home/deploy/realms-wiki/.venv RUN virtualenv /home/deploy/realms-wiki/.venv
RUN /home/deploy/realms-wiki/.venv/bin/pip install /home/deploy/realms-wiki 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 # Logging
RUN mkdir /var/log/realms-wiki && chown deploy.deploy /var/log/realms-wiki 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 # Upstart
RUN mkdir /etc/service/realms-wiki RUN mkdir /etc/service/realms-wiki
ADD realms-wiki.sh /etc/service/realms-wiki/run ADD realms-wiki.sh /etc/service/realms-wiki/run
@ -34,4 +28,7 @@ RUN chmod +x /etc/service/realms-wiki/run
# Clear some fat # Clear some fat
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 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 EXPOSE 5000

View file

@ -6,4 +6,4 @@ if [ "${REALMS_WIKI_CONFIG}" != "" ]; then
realms-wiki configure ${REALMS_WIKI_CONFIG} realms-wiki configure ${REALMS_WIKI_CONFIG}
fi 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