/portal

Systers Portal for communities

Primary LanguagePythonGNU General Public License v2.0GPL-2.0

Systers Portal Build Status Coverage Status Gitter

Systers Portal is for Systers communities to post and share information within and with other communities.

Website: http://portal.systers.org

Project page: http://systers.github.io/portal/

Setup for developers

  1. Make sure you have installed Python 2.7 or above (preferably latest minor release), pip and virtualenv.
  2. Make sure you have PostgreSQL installed.
  3. Clone the repo - git clone git@github.com:systers/portal.git and cd into the portal directory.
  4. Create a virtual environment and install dependencies:
$ virtualenv venv
$ source venv/bin/activate
$ pip install -r requirements/dev.txt
  1. Create systersdb database, where systersdb might be any suitable name.
  2. Fill in the database details in systers_portal/settings/dev.py.
  3. Run export SECRET_KEY=foobarbaz in your terminal, ideally the secret key should be 40 characters long, unique and unpredictable. Optionally to set the shell variable every time you activate the virtualenv, edit venv/bin/activate and add to the bottom the export statement.
  4. Run python systers_portal/manage.py migrate.
  5. Run python systers_portal/manage.py createsuperuser to create a superuser for the admin panel. Fill in the details asked.
  6. Run python systers_portal/manage.py runserver to start the development server. When in testing or production, feed the respective settings file from the command line, e.g. for
    testing python manage.py runserver --settings=systers_portal.settings.testing.
  7. Before commiting run flake8 systers_portal and fix PEP8 warnings.
  8. Run python systers_portal/manage.py test --settings=systers_portal.settings.testing to run all the tests.

Run Portal with Docker

If you want to take a speak peek at Systers Portal, a Docker container is for you. The following Docker is not intended to be run in production at the moment (but might be configured to do so in the future).

  1. Install Docker on your system. Check the installation steps for your specific OS. Docker runs natively on Linux-based system. For Windows and Mac OS X, you should install VirtualBox and Boot2Docker.
  2. Install fig.
  3. Clone the repo - git clone git@github.com:systers/portal.git and cd into the portal directory.
  4. Run fig build. This command will pull the images required to run the project and will install the dependencies.
  5. Run docker run -e SECRET_KEY=foobarbaz portal_web in your terminal.
  6. Run fig run web python systers_portal/manage.py migrate.
  7. Run fig run web python systers_portal/manage.py createsuperuser if you want to create a superuser to access the admin panel.
  8. Run fig up to run the project.
  9. Now Systers Portal should be running on port 8000. If you are on Linux, it is http://0.0.0.0:8000. If you are using Boot2Docker, then it might be http://192.168.59.103:8000/. If the following IP address doesn't work for you, run boot2docker ip and replace the previous ip with the Boot2Docker outputted IP address.

Documentation

Documentation for Systers Portal is generated using Sphinx and available online at http://systers-portal.readthedocs.org/

To build the documentation locally run:

$ cd docs/
$ make html

To view the documentation open the generated index.html file in browser - docs/_build/html/index.html.

For more information on semantics and builds, please refer to the Sphinx official documentation.

You can view the requirements document here.