diff --git a/README.md b/README.md index 2152faf4f..97dac83c4 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,19 @@ Hasjob ====== -Code for Hasjob, HasGeek's job board at https://hasjob.co/ +Code for Hasjob, HasGeek’s job board at https://hasjob.co/ Copyright © 2010-2016 by HasGeek -Hasjob's code is open source under the AGPL v3 license (see LICENSE.txt), -but the name 'Hasjob' and the distinctive appearance of the job board are +Hasjob’s code is open source under the AGPL v3 license (see LICENSE.txt), +but the name ‘Hasjob’ and the distinctive appearance of the job board are not part of the open source code. The code is open to: * Establish trust and transparency on how it works, and * Allow contributions to Hasjob. HasGeek is a business, and like any business has trade secrets, intellectual -property and competition. Hasjob's code is not intended to be used to setup +property and competition. Hasjob’s code is not intended to be used to setup rival job boards. If you really must use this code to run your own job board, the AGPLv3 license @@ -26,7 +26,7 @@ the right to make this assignment. ----- -Hasjob can be used with Docker (recommended) or the harder way with a manual setup. +Hasjob can be used with Docker (recommended for quick start) or the harder way with a manual setup (recommended for getting involved). ## With Docker @@ -87,31 +87,37 @@ Redis does not require special configuration, but must listen on localhost and p Hasjob makes use of subdomains to serve different sub-boards for jobs. To set it up: -* Edit `/etc/hosts` and add these entries: +* Edit `/etc/hosts` and add these entries (substituting `your-machine` with whatever you call your computer): ``` - 127.0.0.1 hasjob.dev - 127.0.0.1 static.hasjob.dev - 127.0.0.1 subboard.hasjob.dev + 127.0.0.1 hasjob.your-machine.local + 127.0.0.1 static.hasjob.your-machine.local + 127.0.0.1 subboard.hasjob.your-machine.local ``` -* Edit `instance/development.py` and change `SERVER_NAME` to `'hasjob.dev:5000'` +* Edit `instance/development.py` and change `SERVER_NAME` to `'hasjob.your-machine.local:5000'` ### Install dependencies Hasjob runs on [Python](https://www.python.org) with the [Flask](http://flask.pocoo.org/) microframework. -#### Virutalenv + pip/easy_install +#### Virutalenv + pip -If you are going to use a computer on which you would work on multiple Python based projects, [Virtualenv](docs.python-guide.org/en/latest/dev/virtualenvs/) is strongly recommended to ensure Hasjob's elaborate and sometimes version-specific requirements doesn't clash with anything else. +If you are going to use a computer on which you would work on multiple Python based projects, [Virtualenv](docs.python-guide.org/en/latest/dev/virtualenvs/) is strongly recommended to ensure Hasjob’s elaborate and sometimes version-specific requirements doesn't clash with anything else. -You will need to install all the requirements listed in `requirements.txt` using `easy_install` or `pip`: +You will need to install all the requirements listed in `requirements.txt` using `pip`: $ pip install -r requirements.txt -If you get an error, try running: +If you intend to actively contribute to Hasjob code, some functionality is sourced from the related libraries [coaster](https://github.com/hasgeek/coaster), [baseframe](https://github.com/hasgeek/baseframe) and [Flask-Lastuser](https://github.com/hasgeek/flask-lastuser). You may want to clone these repositories separately and put them in development mode: - $ easy_install -U setuptools + $ cd .. + $ git clone https://github.com/hasgeek/coaster.git + $ git clone https://github.com/hasgeek/baseframe.git + $ git clone https://github.com/hasgeek/flask-lastuser.git + $ pip uninstall coaster baseframe flask-lastuser + $ for DIR in coaster baseframe flask-lastuser; do cd $DIR; python setup.py develop; cd ..; done + $ cd baseframe && make && cd .. Finish configuration with: @@ -121,17 +127,21 @@ Before you run the server in development mode, make sure you have Postgres serve $ python runserver.py +## Create root board + +Some functionality in Hasjob requires the presence of a sub-board named `www`. Create it by visiting `http://hasjob.your-machine.local:5000/board` (or the `/board` page on whatever hostname and port you used for your installation). The `www` board is a special-case to refer to the root website. + ## Periodic jobs Hasjob maintains user sessions that expire after half hour of inactivity. You need to install a cron script to sweep for expired sessions. Use `crontab -e` as the user account running Hasjob and add: */10 * * * * cd /path/to/hasjob; python manage.py sweep -e dev -Switch to `production` in a production environment. +Switch from `dev` to `production` in a production environment. ## Testing -Tests are written in [CasperJS](http://casperjs.org/). +Tests are outdated at this time, but whatever tests exist are written in [CasperJS](http://casperjs.org/). You need to [install CasperJS](http://docs.casperjs.org/en/latest/installation.html), which needs Python 2.6 (or greater) and [PhantomJS](http://phantomjs.org/) installed.