Skip to content

pmgouveia/hitchwiki

 
 

Repository files navigation

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 development environment 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. (git --version)

Install

  1. Clone the repo: git clone https://github.com/Hitchwiki/hitchwiki.git && cd hitchwiki

  2. If you want to modify any settings before installation, copy files and do modifications to them:

cp configs/settings-example.ini configs/settings.ini
cp configs/vagrant-example.yaml configs/vagrant.yaml

Some of the settings you can modify:

  • If self signed certificate will be installed (i.e. use https) (vagrant.yaml and settings.ini)
  • Domain (hitchwiki.dev by default) or develop using IP (192.168.33.10 by default)
  1. Start installation:
./scripts/vagrant/install.sh
  1. Install will ask for your password to add hitchwiki.dev to your /etc/hosts file. You can modify your sudoers file to stop Vagrant asking for password each time.

  2. Open http://hitchwiki.dev/ in your browser. https://hitchwiki.dev/ works if you set setup_ssl to true from configs/vagrant.yaml

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 (see below)
  • Install Parsoid and VisualEditor

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:

./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:

./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: ./scripts/vagrant/update.sh

Re-Install

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

Vagrant box

We're using Scotchbox.

SSH into Vagrant

vagrant ssh

You're probably most interested in folder /var/www/

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

Setting up production environment

TODO

License

Code MIT Contents Creative Commons

See also

Our custom MediaWiki extensions:

Our fork of an abandoned extension:

About

The Hitchhiker's Guide to Hitchhiking the World

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 38.4%
  • Python 31.9%
  • PHP 26.5%
  • ApacheConf 3.1%
  • Other 0.1%