The Hitchhiker's Guide to Hitchhiking the World
Python Shell PHP ApacheConf Other
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
configs
public
scripts
.bowerrc
.editorconfig
.gitignore
LICENSE.md
README.md
Vagrantfile
composer.json
extensions

README.md

Hitchwiki

The Hitchhiker's Guide to Hitchhiking the World

Hitchwiki is a collaborative website for gathering information about hitchhiking and other ways of extremely cheap ways of transport. It is maintained by many active hitchhikers all around the world. We have information about how to hitch out of big cities, how to cover long distances, maps and many more tips.

How to help

This version is currently under heavy development in Vilnius, 5.—16.12.2016 by @simison, @Remigr and @omelnyk.

Contact us if you want to join the effort!

Read more about developing Hitchwiki from the wiki

Install and start hacking Hitchwiki

Prerequisites

  • A GNU/Linux or OS X machine. Let us know if this works with Cygwin.
  • Install VirtualBox (...because)
  • Install Vagrant (docs)
  • Make sure you have git installed on your system.
  • No need to set up a VM manually, install script will take care of that.

Install

  1. Clone the repo: git clone https://github.com/Hitchwiki/hitchwiki.git && cd hitchwiki
  2. Type bash scripts/vagrant/install.sh. Make sure not to leave out the vagrant/ part.
  3. Install will ask for your password to add "hitchwiki.dev" to your hosts file. To skip this and use http://192.168.33.10/ instead, set config.hostmanager.enabled = false at Vagrant file and copy configs/settings-example.ini to configs/settings.ini and change domain also from there before installing. You can modify your sudoers file to stop Vagrant asking for password each time.
  4. Open http://hitchwiki.dev/ in your browser.

After setup your virtual machine is running. Suspend the virtual machine by typing vagrant suspend. When you're ready to begin working again, just run vagrant up.

Install script will do the following:

  • Install Vagrant hostmanager plugin
  • Setup Vagrant box
  • Download and extract Mediawiki
  • Install dependencies with Composer
  • Create a database and configure MediaWiki
  • Import pages from ./scripts/pages/
  • Create three users
  • Install Parsoid

Pre-created users (user/pass)

  • Admin: Hitchwiki / autobahn
  • Bot: Hitchbot / autobahn
  • User: Hitchhiker / autobahn

Export Semantic structure

If you do changes to Semantic structures (forms, templates etc), you should export those files by running:

bash scripts/vagrant/export_pages.sh

Import Semantic structure

This is done once at install, but needs to be done each time somebody changes content inside ./scripts/pages/. It can be done by running:

bash scripts/vagrant/import_pages.sh

Debug

  • Enable debugging mode by setting debug = true from ./configs/settings.ini. You'll then see SQL and PHP warnings+errors.
  • Use Debugging toolbar by setting get/post/cookie variable hw_debug = 1.
  • See EventLogging extension

Update

  1. Pull latest changes: git pull origin master
  2. Run update script: bash scripts/vagrant/update.sh

Re-Install

  1. Run re-install script: bash scripts/vagrant/reinstall.sh

Vagrant box

We're using Scotchbox.

SSH into Vagrant

vagrant ssh

Database access

From the app

Setting Value
User root
Pass root
Host localhost

From desktop

Only via SSH Forwarding.

Setting Value
User root
Pass root
Host localhost
SSH Host 192.168.33.10
SSH User vagrant
SSH Password vagrant

Clean Vagrant box

If for some reason you want to have clean Scotchbox, database and MediaWiki installed, run:

vagrant destroy && vagrant up

Update Vagrant box

Although not necessary, if you want to check for updates, just type:

vagrant box outdated

It will tell you if you are running the latest version or not of the box. If it says you aren't, simply run:

vagrant box update

Setting up production environment

TODO

License

Code MIT Contents Creative Commons

See also

Our custom MediaWiki extensions:

Our fork of an abandoned extension: