Hasjob

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 arenot 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, intellectualproperty and competition. Hasjob’s code is not intended to be used to setuprival job boards.

If you really must use this code to run your own job board, the AGPLv3 licenserequires you to release all your modifications to the public under the samelicense. You may not make a proprietary fork.

To have your contributions merged back into the master repository, you mustagree to assign copyright to HasGeek and must assert that you havethe right to make this assignment.

Installation

Hasjob can be used with Docker (recommended for quick start) or the harder way with a manual setup (recommended for getting involved). The Docker approach is unmaintained at this time. Let us know if something doesn't work.

Pick an environment

Hasjob requires a FLASK_ENV environment variable set to one of the following values, depending on whether the deployment is in development or production:

DEVELOPMENT or development or dev (default)

PRODUCTION or production or prod

In a production environment, you must set FLASK_ENV globally for it to be available across processes. On Ubuntu/Debian systems, add it to /etc/environment and reboot.

Install dependencies

Virutalenv + pip

If you are going to use a computer on which you would work on multiple Python based projects, Virtualenv 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 pip:

$ pip install -r requirements.txt

If you intend to actively contribute to Hasjob code, some functionality is sourced from the related libraries coaster, baseframe and Flask-Lastuser. You may want to clone these repositories separately and put them in development mode:

Before you run the server in development mode, make sure you have Postgres server and Redis server running as well. To start Hasjob:

$ 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 requires some tasks to be run in periodic background jobs. These can be called from cron. Use crontab -e as the user account running Hasjob and add:

Testing

Edit the top few lines of test file tests/test_job_post.js with the URL, username and password.

Run the test with casperjs test tests/test_job_post.js.

Disabling Cache

If you ever want to disable caching when developing, inside your development.py, add these lines -

CACHE_TYPE = 'null'
CACHE_NO_NULL_WARNING = False

Other notes

If you encounter a problem setting up, please look at existing issue reportson GitHub before filing a new issue. This code is the same version used inproduction so there is a very good chance you did something wrong and thereis no actual problem in the code. Issues you encounter after setup couldbe real bugs.

WSGI is recommended for production. For Apache: enable mod_wsgi and make aVirtualHost with: