Hi,
would be nice if there was a Docker Container for wiki.js
I've forked the repository and I'll try to get a Container running.
Cheers
There was some work done already for a dockerfile. See https://github.com/Requarks/wiki-docker
It's not ready but most of it is done if you want to take a look.
Thanks, I'll have a look.
You should probably look into using docker-compose in order to have the DB separated from the frontend!
Just a headsup for everyone:
I'm using this dockerfile:
FROM base/archlinux:latest
ENV DOWNLOAD_URL https://github.com/Requarks/wiki/releases/download/v1.0.0-beta.8/wiki-js.tar.gz
RUN \
pacman -Sy \
&& yes | pacman --noconfirm -S ca-certificates gcc git grep make nodejs npm python2 sed wget \
&& update-ca-trust \
&& mkdir -p /var/www/wiki \
&& mkdir -p /etc/wiki/keys \
&& wget ${DOWNLOAD_URL} -O wiki-js.tar.gz \
&& mv wiki-js.tar.gz /var/www/wiki \
&& cd /var/www/wiki \
&& tar xfz wiki-js.tar.gz \
&& rm wiki-js.tar.gz \
&& ln -s /usr/bin/python2 /usr/bin/python \
&& npm install --only=production && npm rebuild
WORKDIR /var/www/wiki
EXPOSE 80
CMD ["node", "server.js"]
EDIT: I switched to archlinux because of the git version in alpinelinux and node-gyp errors.
My docker-compose looks like this (I'm using rancher to manage my docker containers):
wiki-mongo:
image: mongo
stdin_open: true
tty: true
labels:
io.rancher.container.pull_image: always
command: mongod --smallfiles --oplogSize 128
volumes:
- /your/local/path/db:/data/db
wiki-js:
image: <url-to-wikijs-image>
stdin_open: true
tty: true
labels:
io.rancher.container.pull_image: always
volumes:
- /your/local/path/data:/var/www/wiki/data
- /your/local/path/repo:/var/www/wiki/repo
- /your/local/path/keys:/etc/wiki/keys
- /your/local/path/config.yml:/var/www/wiki/config.yml
links:
- wiki-mongo:mongo
expose:
- "80"
In addition I'm using a load-balancer in front of wiki.js but you could easily expose the container port to a host port.
Also interested in this
Moved ticket to Feature Board: https://wikijs.canny.io/features/p/provide-dockerfile
Closing this ticket.
Most helpful comment
You should probably look into using docker-compose in order to have the DB separated from the frontend!