Commit 55f610da authored by Nicolas Joyard's avatar Nicolas Joyard
Browse files

Update docs

parent 076b7938
Deployment on a custom machine
You will need the following:
* A clone of the git repository at ````
* a PostgreSQL>=9.2 database (not necessarily on the same machine)
* a WSGI-capable web server
Setup environment
Set the following environment variables::
Customize settings
Create a copy of the example local settings file::
$ cp memopol/ memopol/
Edit ``memopol/`` to set directories, database settings and
allowed hosts. Setup your WSGI server to serve:
* Static files from the directory specified in the ``PUBLIC_DIR`` setting to the
``/static`` URL
* The memopol/ WSGI application
Initial memopol setup
Install client libraries::
$ bin/
Setup the database schema::
$ ./ migrate --noinput
Collect static files::
$ ./ collectstatic --noinput
Memopol should be ready to go.
To update simply pull the repository and run setup commands again::
$ git pull
$ bin/
$ ./ migrate --noinput
$ ./ collectstatic --noinput
Data provisionning
Set up two cron jobs:
* One to update data from parliaments, that runs ``bin/update_all``. This
script takes quite some time to run, so you should schedule it once every
night for example
* One to refresh scores, that runs ``./ refresh_scores``. This one
runs quite quickly (a few seconds), you may want to run it after the update
job has completed (but you can run it more often).
Ensure that cron jobs get the same environment as the application.
Continue to :doc:`administration`.
......@@ -92,4 +92,4 @@ to be executed, either do it manually::
OpenShift is fun, login with ssh and look around if you're curious, you'll be
able to recreate your app without much effort if you break it anyway.
Continue to :doc:`administration`.
Continue to :doc:`deploy-custom`.
......@@ -12,7 +12,8 @@ Contents:
:maxdepth: 2
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment