$ sudo apt-get install git
$ git clone https://github.com/erudit/eruditorg.git
$ sudo apt-get install -y python3.4-venv python3-dev postgresql postgresql-server-dev-all libxml2-dev libxslt1-dev zlib1g-dev python3-pip
Create the virtualenv:
$ pyvenv-3.4 env
Activate the virtualenv:
$ . env/bin/activate
Install the project dependencies:
$ pip install -r requirements.txt
First, create the database:
$ sudo su - postgres
$ createdb zenon
$ logout
The default configuration connects to database zenon
with user postgres
and no password.
If you do not want this, and would rather use a password, please follow the postgresql documentation on how to create a user and update the settings.py
file accordingly.
Allow local connections over TCP/IP.
Edit the pg_hba.conf
file:
$ sudo vim /etc/postgresql/9.3/main/pg_hba.conf
And replace the following line:
host all all 127.0.0.1/32 md5
With:
host all all 127.0.0.1/32 trust
Reload the postgresql configuration:
$ sudo /etc/init.d postgresql reload
Run the migrations:
$ python erudit/manage.py migrate
Create a superuser:
$ python erudit/manage.py createsuperuser
You can now run the development server
$ python erudit/manage.py runserver
Erudit stores its documents in Fedora Commons and uses the Solr search platform. If you need to work on a part of the project that is related to any of these parts, we provide a virtual machine with the required tools.
Clone the developer VM.
$ git clone git@github.com:erudit/vm-dev.git
Follow the instructions in the vm-dev
project's README.md
Log in the VM.
$ vagrant ssh
In the VM, clone the vm-config
project:
$ git clone https://gitlab.erudit.team/erudit/vm-config.git
Note: this repository is private. If you need credentials, ask us on IRC.
Follow the instructions in vm-config
' README.md.
The developer VM provides two services: Fedora Commons and Solr.
- Solr is located at
http://192.168.10.150:8080/solr/
- Fedora is located at
http://192.168.10.150:8080/fedora/
TBD
The project's documentation is built with Sphinx
Building the documentation is optional. For this reason, sphinx
is not listed in requirements.txt
If you wish to build the documentation, you must first install sphinx in your virtualenv.
$ pip install sphinx
You will then be able to build the docoumentation using the Makefile
in the docs
directory:
$ make html
You can run the tests with:
$ tox
Please visit http://eruditorg.readthedocs.org/fr/latest/
Please refer to CONTRIBUTING.md for contribution guidelines.
If you have further questions or if you wish to discuss the project, please join us on #erudit on Freenode.