docker run --mount type=bind,source="~/my/repo",target=/repo \
-p 127.0.0.1:<myport>:80 -it existme/gollum:0.1
Then you can browse your wiki at http://localhost:<myport>
The docker instance is built on top of existme/gollum-base:latest
. The source of that image exists in docker/base-image
.
To build the docker image from the source run:
./docker-build.sh
To run the docker instance on a certain repo on a specific port run:
./docker-run.sh -r <~/my/repo> -p 4545
After the instance is up and running, you should be able to browse to http://localhost:4545
and edit your wiki!
sudo apt-get install ruby ruby-dev make zlib1g-dev libicu-dev build-essential git cmake
sudo gem install gollum
####### additional needed libraries
sudo gem install awesome_print oj
with authentication:
####### additionally you need the following packages:
sudo apt install libssl-dev
sudo gem install gollum-rugged_adapter omnigollum omniauth-ldap
better to install them without ri documentations
sudo gem install gollum gollum-rugged_adapter omnigollum omniauth-ldap --no-document
sudo gem install awsome_print oj --no-document
with github favour:
gem install github-markdown --no-document
with common marker:
gem install commonmarker --no-document
####### This instruction is for installing components in Ubuntu
####### Install node
####### first remove previous versions
sudo apt-get purge nodejs npm
####### use the following script to install node > 6 here we use 9
v=9
curl -sL https://deb.nodesource.com/setup_$v.x | sudo -E bash -
sudo apt-get install nodejs
npm config set proxy http://wwwproxy.axis.com:3128
npm config set https-proxy http://wwwproxy.axis.com:3128
####### This is a workaround for proxy issue when npm tries to clone some components through github
git config --global url."https://github.com/".insteadOf git://github.com/
####### Go inside the cloned csi-wiki folder and run:
npm install
To install the bundle do as follows:
####### First you need to install webpack globally but inorder to do that you need to first to the above configuration again this time with sudo
sudo npm config set proxy http://wwwproxy.axis.com:3128
sudo npm config set https-proxy http://wwwproxy.axis.com:3128
sudo git config --global url."https://github.com/".insteadOf git://github.com/
####### Then you need to install webpack globally
sudo npm install webpack -g
####### Link the `node` executable correctly
sudo ln -s /usr/bin/nodejs /usr/bin/node
####### Finally run:
npm run build:prod
As a result of the above operation a bundle will be created in:
assets/scripts/editor-bundle.js
assets/scripts/viewer-bundle.js
if you need to remove http proxy for npm command you can use:
npm config rm proxy
npm config rm https-proxy
npm uninstall webpack-cli && npm install --save-dev webpack-cli@latest
npm rebuild
npm update
There are some bugs that are not fixable easilly, those are listed here:
According to this issue, the only way to fix it is to apply the following diff to the file /var/lib/gems/2.3.0/gems/gollum-rugged_adapter-0.4.4/lib/rugged_adapter/git_layer_rugged.rb
.
@@ -167,7 +167,7 @@ module Gollum
blob = @repo.lookup(entry[:oid])
count = 0
blob.content.each_line do |line|
- next unless line.force_encoding("UTF-8").match(/#{Regexp.escape(query)}/i)
+ next unless line.force_encoding("UTF-8").scrub().match(/#{Regexp.escape(query)}/i)
count += 1
end
path = options[:path] ? ::File.join(options[:path], root, entry[:name]) : "#{root}#{entry[:name]}"
Gollum is using an old version of jQuery (1.7.2) which is locate in /var/lib/gems/2.5.0/gems/gollum-4.1.2/lib/gollum/public/gollum/javascript/jquery-1.7.2.min.js
. To fix the conflicts between the original jQuery version and the one which is used by other plugins such as jQueryContextMenu, you need to fix the following file:
/var/lib/gems/2.5.0/gems/gollum-4.1.2/lib/gollum/public/gollum/javascript/gollum.js
@@ -40,3 +40,3 @@
// ua
$(document).ready(function() {
+ var $ = jq172;
+
$('#delete-link').click( function(e) {
var ok = confirm($(this).data('confirm'));
ToastUI editor configuration is located in: 'assets/scripts/editor.js'
-
Make sure you have the right environment:
nvm use v13.5.0
-
Make sure webpack is working properly:
webpack --env dev --progress --profile --colors
-
Make sure bundler works properly:
sudo -H gem install bundler bundle update --bundler sudo -H bundle update
-
Try running with
bundle exec bin/gollum --config wiki-config.rb ~/git/privatewiki --port 8090 --adapter rugged
-
If after updating gems you get
/var/lib/gems/3.0.0/gems/mustermann-2.0.2/lib/mustermann/regular.rb:41:in `check_anchors': regular expression should not contain ^: "^(\\\\/rcc\\\\/)" (Mustermann::CompileError) . . from <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in `require' from <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in `require' from /var/lib/gems/3.0.0/gems/gollum-5.3.2/bin/gollum:282:in `<top (required)>' from /usr/local/bin/gollum:25:in `load' from /usr/local/bin/gollum:25:in `<main>'
make sure that updated gollum is not running. In this case obviously gollum '5.3.2' runs on top and then it runs gollum
4.1.4
which is our installed version of gollum. -
to uninstall latest gollum, run:
sudo gem uninstall gollum -v 5.3.2