Git based wiki inspired by Gollum
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
1.6KB

  1. # Based on :
  2. # https://github.com/scragg0x/realms-wiki/blob/master/docker/Dockerfile
  3. FROM debian:jessie
  4. MAINTAINER Theodotos Andreou theodotos.andreou@puri.sm
  5. RUN apt-get update && \
  6. apt-get -q -y dist-upgrade && \
  7. apt-get install -q -y \
  8. software-properties-common \
  9. python-software-properties \
  10. python-pip \
  11. python-dev \
  12. libxml2-dev \
  13. libxslt1-dev \
  14. zlib1g-dev \
  15. libffi-dev \
  16. libyaml-dev \
  17. libssl-dev \
  18. libsasl2-dev \
  19. libldap2-dev \
  20. npm git \
  21. python-virtualenv && \
  22. apt-get clean && \
  23. rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
  24. RUN ln -s /usr/bin/nodejs /usr/bin/node && \
  25. npm install -g bower clean-css
  26. RUN useradd -ms /bin/bash wiki
  27. USER wiki
  28. RUN git clone https://github.com/scragg0x/realms-wiki /home/wiki/realms-wiki
  29. WORKDIR /home/wiki/realms-wiki
  30. RUN virtualenv .venv && \
  31. . .venv/bin/activate && \
  32. pip install -r requirements.txt
  33. RUN bower install
  34. ENV WORKERS=3
  35. ENV GEVENT_RESOLVER=ares
  36. ENV REALMS_ENV=docker
  37. ENV REALMS_WIKI_PATH=/home/wiki/data/repo
  38. ENV REALMS_DB_URI='sqlite:////home/wiki/data/wiki.db'
  39. RUN mkdir /home/wiki/data && touch /home/wiki/data/.a
  40. ADD flask_ldap_login.patch /home/wiki/
  41. RUN patch ./.venv/lib/python2.7/site-packages/flask_ldap_login/__init__.py < \
  42. /home/wiki/flask_ldap_login.patch
  43. EXPOSE 5000
  44. CMD . .venv/bin/activate && \
  45. gunicorn \
  46. --name realms-wiki \
  47. --access-logfile - \
  48. --error-logfile - \
  49. --worker-class gevent \
  50. --workers ${WORKERS} \
  51. --bind 0.0.0.0:5000 \
  52. --chdir /home/wiki/realms-wiki \
  53. 'realms:create_app()'