Wikijs
Setting Up WikiJS on Docker Compose
Wiki.js or WikiJS is an open source project based on NodeJS. The below is example is based on WikiJS V2, there is a V3 in development. However V3 has been in development for over a year i believe at this point (2024). The official documentation / Github has more information.
WikiJS Github - https://github.com/requarks/wiki
WikiJS Docs V2 - https://js.wiki/
WikiJS Docs V3 - https://beta.js.wiki/
Why Choose WikiJS
WikiJS offers a variety of editors depending on what type of content it is that needs to be written, as well as a simple user interface.
The editors available are:
- AsciiDoc - Plain Text Formatting
- Code Raw HTML
- Markdown - Plain Text Formatting
- Visual Editor - Rich-Text WYSIWYG
Primarily the Markdown Editor is used to write documentation on other services such as Github and GitLab, so is a lot more familiar to Developers due to Markdown being used for Git Repository Documentation.
Docker Compose Example
Below is an example docker-compose file with additional configurations used to start WikiJS behind a Traefik Reverse Proxy. An example docker-compose configuration from WikiJS can be found here https://docs.requarks.io/install/docker#using-docker-compose where none of the additional configuration is specified.
Start WikiJS
Now start the docker compose file above has had the relevent configuration updated, start WikiJS using the folliowing command:
Key Components of Docker Compose Configuration Explained
- Image - Specifies the WikiJS server image and tag
- Ports - Exposes WikiJS on specified port
- Volumes - For media files and custom templates
- Environment - Configures database credentials
- Labels - Used by Traefik to provide external access to the service, once the service all its dependancies have been started are
"healthy" and Accessible
, Public Service Name and what provider to use to check and obtain for an SSL Certificate
Volumes
- Persistent Storage - Defined for PostgreSQL (
Database
) and Redis(redis
)