Giter Club home page Giter Club logo

Comments (6)

gravufo avatar gravufo commented on May 22, 2024 5

You should probably look into using docker-compose in order to have the DB separated from the frontend!

from wiki.

Isotop7 avatar Isotop7 commented on May 22, 2024 1

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.

from wiki.

NGPixel avatar NGPixel commented on May 22, 2024

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.

from wiki.

martialblog avatar martialblog commented on May 22, 2024

Thanks, I'll have a look.

from wiki.

LogonDev avatar LogonDev commented on May 22, 2024

Also interested in this

from wiki.

NGPixel avatar NGPixel commented on May 22, 2024

Moved ticket to Feature Board: https://wikijs.canny.io/features/p/provide-dockerfile

Closing this ticket.

from wiki.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.