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.

README.md 3.0KB

9 years ago
9 years ago
9 years ago
9 years ago
7 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
8 years ago
8 years ago
8 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. # Realms Wiki Beta with LDAP support
  2. This is a recipe of [Realms Wiki](https://github.com/scragg0x/realms-wiki) patched so that a docker image is build with LDAP support. The Dockefile actually downloads the Realms Wiki code from [Matthew Scragg's](https://github.com/scragg0x) original repo and not from my fork.
  3. ### Differences from the master repo
  4. * The docker image is based on Debian jessie instead of Ubuntu trusty
  5. * The *flask_ldap_login* is patched using [Stephane Martin's](https://github.com/stephane-martin) [patch](https://github.com/ContinuumIO/flask-ldap-login/issues/26) to eliminate the "Internal Server Error" message when logging in with LDAP.
  6. ### Clone the repo
  7. ```
  8. git clone git@github.com:theodotos/realms-wiki.git
  9. ```
  10. ### Build the image
  11. ```
  12. cd realms-wiki/docker
  13. docker build -t realm-wiki-img .
  14. ```
  15. ### Pull it from Docker Hub
  16. If you prefer using my build, you can pull it from Docker Hub:
  17. ```
  18. docker pull theodotos/realms-wiki
  19. ```
  20. ### Run the container
  21. Create a *realms-wiki* volume:
  22. ```
  23. docker volume create --name realms-wiki
  24. ```
  25. For your own build:
  26. ```
  27. docker run -d --name realms-wiki -p 5000:5000 --volume realms-wiki:/home/wiki realms-wiki-img
  28. ```
  29. For my build:
  30. ```
  31. docker run -d --name realms-wiki -p 5000:5000 --volume realms-wiki:/home/wiki theodotos/realms-wiki:latest
  32. ```
  33. ### Configure the container
  34. Prepare a *realms-wiki.json* file like this:
  35. ```
  36. cat > realms-wiki.json << EOF
  37. {
  38. "ALLOW_ANON": true,
  39. "BASE_URL": "http://realms.example.com",
  40. "CACHE_TYPE": "simple",
  41. "DB_URI": "sqlite:////home/wiki/data/wiki.db",
  42. "PORT": 5000,
  43. "REGISTRATION_ENABLED": true,
  44. "SEARCH_TYPE": "simple",
  45. "SECRET_KEY": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  46. "SITE_TITLE": "Example Wiki",
  47. "WIKI_PATH": "/home/wiki/data/repo",
  48. "LDAP": {
  49. "URI": "ldap://ldap.example.com:389",
  50. "BIND_DN": "cn=realms,ou=services,dc=example,dc=com",
  51. "BIND_AUTH": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  52. "USER_SEARCH": {
  53. "base": "ou=people,dc=example,dc=com",
  54. "filter": "uid=%(username)s"},
  55. "START_TLS": true,
  56. "KEY_MAP": {
  57. "username": "uid",
  58. "email": "mail"},
  59. "OPTIONS": {
  60. "OPT_PROTOCOL_VERSION": 3}
  61. }
  62. }
  63. EOF
  64. ```
  65. **NOTE: you can use the `apg -n1 -x65 -m65` command to generate a SECRET_KEY**
  66. Copy the config over to the container:
  67. ```
  68. cp realms-wiki.json realms-wiki:/home/wiki/realms-wiki
  69. ```
  70. Restart the container:
  71. ```
  72. docker restart realms-wiki
  73. ```
  74. Browse to http://realms.example.com:5000 to test it.
  75. ### Some tips about STARTTLS
  76. If you ldap backend is not protected by a publicly trusted CA, you will need to add your Internal ROOT CA certificate in the trusted CA list of your container.
  77. Copy your Internal ROOT CA certificate in the container:
  78. ```
  79. docker cp example-rootca.crt realms-wiki:/usr/local/share/ca-certificates/
  80. ```
  81. Add your Internal CA as trusted in the trusted CA list:
  82. ```
  83. docker exec -i -t -u root realms-wiki /usr/sbin/update-ca-certificates
  84. ```
  85. Restart the container and try again.