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.

177 lines
16 KiB

  1. <div align="center">
  2. <img src="https://static.requarks.io/logo/wikijs-full.svg" alt="Wiki.js" width="600" />
  3. [![Release](https://img.shields.io/github/release/Requarks/wiki.svg?style=flat&maxAge=3600)](https://github.com/Requarks/wiki/releases)
  4. [![License](https://img.shields.io/badge/license-AGPLv3-blue.svg?style=flat)](https://github.com/requarks/wiki/blob/master/LICENSE)
  5. [![Standard - JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-green.svg?style=flat&logo=javascript&logoColor=white)](http://standardjs.com/)
  6. [![Downloads](https://img.shields.io/github/downloads/Requarks/wiki/total.svg?style=flat&logo=github)](https://github.com/Requarks/wiki/releases)
  7. [![Docker Pulls](https://img.shields.io/docker/pulls/requarks/wiki.svg?logo=docker&logoColor=white)](https://hub.docker.com/r/requarks/wiki/)
  8. [![Build + Publish](https://github.com/Requarks/wiki/actions/workflows/build.yml/badge.svg)](https://github.com/Requarks/wiki/actions/workflows/build.yml)
  9. [![Huntr](https://img.shields.io/badge/security%20bounty-disclose-brightgreen.svg?style=flat&logo=cachet&logoColor=white)](https://huntr.dev/bounties/disclose)
  10. [![GitHub Sponsors](https://img.shields.io/github/sponsors/ngpixel?logo=github&color=ea4aaa)](https://github.com/users/NGPixel/sponsorship)
  11. [![Open Collective backers and sponsors](https://img.shields.io/opencollective/all/wikijs?label=backers&color=218bff&logo=opencollective&logoColor=white)](https://opencollective.com/wikijs)
  12. [![Chat on Slack](https://img.shields.io/badge/slack-requarks-CC2B5E.svg?style=flat&logo=slack)](https://wiki.requarks.io/slack)
  13. [![Twitter Follow](https://img.shields.io/badge/follow-%40requarks-blue.svg?style=flat&logo=twitter)](https://twitter.com/requarks)
  14. [![Reddit](https://img.shields.io/badge/reddit-%2Fr%2Fwikijs-orange?logo=reddit&logoColor=white)](https://www.reddit.com/r/wikijs/)
  15. [![Subscribe to Newsletter](https://img.shields.io/badge/newsletter-subscribe-yellow.svg?style=flat&logo=mailchimp)](https://blog.js.wiki/subscribe)
  16. ##### A modern, lightweight and powerful wiki app built on NodeJS
  17. </div>
  18. - **[Official Website](https://wiki.js.org/)**
  19. - **[Documentation](https://docs.requarks.io/)**
  20. <h2 align="center">Donate</h2>
  21. <div align="center">
  22. Wiki.js is an open source project that has been made possible due to the generous contributions by community [backers](https://wiki.js.org/about). If you are interested in supporting this project, please consider [becoming a sponsor](https://github.com/users/NGPixel/sponsorship), [becoming a patron](https://www.patreon.com/requarks), donating to our [OpenCollective](https://opencollective.com/wikijs), via [Paypal](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FLV5X255Z9CJU&source=url) or via Ethereum (`0xe1d55c19ae86f6bcbfb17e7f06ace96bdbb22cb5`).
  23. [![Become a Sponsor](https://img.shields.io/badge/donate-github-ea4aaa.svg?style=popout&logo=github)](https://github.com/users/NGPixel/sponsorship)
  24. [![Become a Patron](https://img.shields.io/badge/donate-patreon-orange.svg?style=popout&logo=patreon)](https://www.patreon.com/requarks)
  25. [![Donate on OpenCollective](https://img.shields.io/badge/donate-open%20collective-blue.svg?style=popout&logo=data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSIyNTZweCIgaGVpZ2h0PSIyNTZweCIgdmlld0JveD0iMCAwIDI1NiAyNTYiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlNaWQiPjxnPjxwYXRoIGQ9Ik0yMDkuNzY1MTQ0LDEyOC4xNDk5NzkgQzIwOS43NjUxNDQsMTQ0LjE2MzMgMjA0Ljg2NDM4MSwxNTkuNDg5ODkgMTk2LjQ5ODc0NywxNzIuNzI1MDcyIEwyMjkuOTQ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yMjkuMTYxODg0IEwxNzEuNDE3NDU0LDE5NS43MzA1NjQgQzE1OS41NTU3MzQsMjA1LjQ4NTI2OCAxNDQuMjYwMzU5LDIxMC4zNTQ4MTYgMTI3LjUxMzQ4NCwyMTAuMzU0ODE2IEwxMjcuNTEzNDg0LDIxMC4zNTQ4MTYgWiIgZmlsbD0iIzdGQURGMiI+PC9wYXRoPjwvZz48L3N2Zz4=)](https://opencollective.com/wikijs)
  26. [![Donate via Paypal](https://img.shields.io/badge/donate-paypal-blue.svg?style=popout&logo=paypal)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FLV5X255Z9CJU&source=url)
  27. [![Donate via Ethereum](https://img.shields.io/badge/donate-ethereum-999.svg?style=popout&logo=ethereum&logoColor=CCC)](https://etherscan.io/address/0xe1d55c19ae86f6bcbfb17e7f06ace96bdbb22cb5)
  28. [![Donate via Bitcoin](https://img.shields.io/badge/donate-bitcoin-ff9900.svg?style=popout&logo=bitcoin&logoColor=CCC)](https://checkout.opennode.com/p/2553c612-f863-4407-82b3-1a7685268747)
  29. [![Buy a T-Shirt](https://img.shields.io/badge/buy-t--shirts-teal.svg?style=popout&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHg9IjBweCIgeT0iMHB4Igp3aWR0aD0iMjQiIGhlaWdodD0iMjQiCnZpZXdCb3g9IjAgMCAxOTIgMTkyIgpzdHlsZT0iIGZpbGw6IzAwMDAwMDsiPjxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0ibm9uemVybyIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIHN0cm9rZS1saW5lY2FwPSJidXR0IiBzdHJva2UtbGluZWpvaW49Im1pdGVyIiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIHN0cm9rZS1kYXNoYXJyYXk9IiIgc3Ryb2tlLWRhc2hvZmZzZXQ9IjAiIGZvbnQtZmFtaWx5P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a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
  33. It also optionally packages the [PostgreSQL](https://github.com/kubernetes/charts/tree/master/stable/postgresql) as the database but you are free to bring your own.
  34. ## Prerequisites
  35. - PV provisioner support in the underlying infrastructure (with persistence storage enabled) if you want data persistance
  36. ## Adding the Wiki.js Helm Repository
  37. ```console
  38. $ helm repo add requarks https://charts.js.wiki
  39. ```
  40. ## Installing the Chart
  41. To install the chart with the release name `my-release` run the following:
  42. ### Using Helm 3:
  43. ```console
  44. $ helm install my-release requarks/wiki
  45. ```
  46. ### Using Helm 2:
  47. ```console
  48. $ helm install --name my-release requarks/wiki
  49. ```
  50. The command deploys Wiki.js on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.
  51. > **Tip**: List all releases using `helm list`
  52. ## Uninstalling the Chart
  53. To uninstall/delete the `my-release` deployment:
  54. ```console
  55. $ helm delete my-release
  56. ```
  57. The command removes all the Kubernetes components associated with the chart and deletes the release.
  58. > **Warning**: Persistant Volume Claims for the database are not deleted automatically. They need to be manually deleted
  59. ```console
  60. $ kubectl delete pvc/data-wiki-postgresql-0
  61. ```
  62. ## Configuration
  63. The following table lists the configurable parameters of the Wiki.js chart and their default values.
  64. | Parameter | Description | Default |
  65. | ------------------------------- | ------------------------------- | ---------------------------------------------------------- |
  66. | `image.repository` | Wiki.js image | `requarks/wiki` |
  67. | `image.tag` | Wiki.js image tag | `latest` |
  68. | `imagePullPolicy` | Image pull policy | `IfNotPresent` |
  69. | `replicacount` | Amount of wiki.js service pods to run | `1` |
  70. | `revisionHistoryLimit` | Total amount of revision history points | `10` |
  71. | `resources.limits` | wiki.js service resource limits | `nil` |
  72. | `resources.requests` | wiki.js service resource requests | `nil` |
  73. | `nodeSelector` | Node labels for wiki.js pod assignment | `{}` |
  74. | `affinity` | Affinity settings for wiki.js pod assignment | `{}` |
  75. | `schedulerName` | Name of an alternate scheduler for wiki.js pod | `nil` |
  76. | `tolerations` | Toleration labels for wiki.jsk pod assignment | `[]` |
  77. | `volumeMounts` | Volume mounts for Wiki.js container | `[]` |
  78. | `volumes` | Volumes for Wiki.js Pod | `[]` |
  79. | `ingress.enabled` | Enable ingress controller resource | `false` |
  80. | `ingress.className` | Ingress class name | `""` |
  81. | `ingress.annotations` | Ingress annotations | `{}` |
  82. | `ingress.hosts` | List of ingress rules | `[{"host": "wiki.local", "paths": ["/"]}]` |
  83. | `ingress.tls` | Ingress TLS configuration | `[]` |
  84. | `sideload.enabled` | Enable sideloading of locale files from git | `false` |
  85. | `sideload.repoURL` | Git repository URL containing locale files | `https://github.com/Requarks/wiki-localization` |
  86. | `sideload.env` | Environment variables for sideload Container | `{}` |
  87. | `postgresql.enabled` | Deploy postgres server (see below) | `true` |
  88. | `postgresql.postgresqlDatabase` | Postgres database name | `wiki` |
  89. | `postgresql.postgresqlUser` | Postgres username | `postgres` |
  90. | `postgresql.postgresqlHost` | External postgres host | `nil` |
  91. | `postgresql.postgresqlPassword` | External postgres password | `nil` |
  92. | `postgresql.existingSecret` | Provide an existing `Secret` for postgres | `nil` |
  93. | `postgresql.existingSecretKey` | The postgres password key in the existing `Secret` | `postgresql-password` |
  94. | `postgresql.postgresqlPort` | External postgres port | `5432` |
  95. | `postgresql.ssl` | Enable external postgres SSL connection | `false` |
  96. | `postgresql.ca` | Certificate of Authority content for postgres | `nil` |
  97. | `postgresql.persistence.enabled` | Enable postgres persistence using PVC | `true` |
  98. | `postgresql.persistence.existingClaim` | Provide an existing `PersistentVolumeClaim` for postgres | `nil` |
  99. | `postgresql.persistence.storageClass` | Postgres PVC Storage Class (example: `nfs`) | `nil` |
  100. | `postgresql.persistence.size` | Postgers PVC Storage Request | `8Gi` |
  101. Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
  102. ```console
  103. $ helm install --name my-release \
  104. --set postgresql.persistence.enabled=false \
  105. requarks/wiki
  106. ```
  107. Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,
  108. ```console
  109. $ helm install --name my-release -f values.yaml requarks/wiki
  110. ```
  111. > **Tip**: You can use the default [values.yaml](values.yaml)
  112. ## PostgresSQL
  113. By default, PostgreSQL is installed as part of the chart.
  114. ### Using an external PostgreSQL server
  115. To use an external PostgreSQL server, set `postgresql.enabled` to `false` and then set `postgresql.postgresqlHost` and `postgresql.postgresqlPassword`. To use an existing `Secret`, set `postgresql.existingSecret`. The other options (`postgresql.postgresqlDatabase`, `postgresql.postgresqlUser`, `postgresql.postgresqlPort` and `postgresql.existingSecretKey`) may also want changing from their default values.
  116. To use an SSL connection you can set `postgresql.ssl` to `true` and if needed the path to a Certificate of Authority can be set using `postgresql.ca` to `/path/to/ca`. Default `postgresql.ssl` value is `false`.
  117. If `postgresql.existingSecret` is not specified, you also need to add the following Helm template to your deployment in order to create the postgresql `Secret`:
  118. ```yaml
  119. kind: Secret
  120. apiVersion: v1
  121. metadata:
  122. name: {{ template "wiki.postgresql.secret" . }}
  123. data:
  124. {{ template "wiki.postgresql.secretKey" . }}: "{{ .Values.postgresql.postgresqlPassword | b64enc }}"
  125. ```
  126. ## Persistence
  127. Persistent Volume Claims are used to keep the data across deployments. This is known to work in GCE, AWS, and minikube.
  128. See the [Configuration](#configuration) section to configure the PVC or to disable persistence.
  129. ## Ingress
  130. This chart provides support for Ingress resource. If you have an available Ingress Controller such as Nginx or Traefik you maybe want to set `ingress.enabled` to true and add `ingress.hosts` for the URL. Then, you should be able to access the installation using that address.