Skip to content
This repository has been archived by the owner on Apr 22, 2021. It is now read-only.

Commit

Permalink
Rename database: iati-ds -> iati-datastore
Browse files Browse the repository at this point in the history
Makes the name of the database clearer to its purpose.
  • Loading branch information
dalepotter committed Jan 23, 2018
1 parent 76d0fba commit e7d9b9f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,13 @@ Deploying with apache
* Create a database (in postgres), and set an environment variable
`DATABASE_URL`. e.g.:

sudo -u postgres createdb iati-ds -O my_username -E utf-8
export DATABASE_URL='postgres:///iati-ds'
sudo -u postgres createdb iati-datastore -O my_username -E utf-8
export DATABASE_URL='postgres:///iati-datastore'

* Run `iati create_database` to create the db tables
* Set up a cron job for updates. (Add the following line after running `crontab -e`)

0 0 * * * export DATABASE_URL='postgres:///iati-ds'; /usr/local/bin/iati crawl update
0 0 * * * export DATABASE_URL='postgres:///iati-datastore'; /usr/local/bin/iati crawl update

* Run a worker with `iati queue background`
- This needs to persist when you close your ssh connection. A simple way of doing this is using [screen](http://www.gnu.org/software/screen/).
Expand All @@ -103,7 +103,7 @@ Deploying with apache
* Create a datastore.wsgi file containing this code (this is necessary because Apache's mod wsgi handles environment variables differently):

import os
os.environ['DATABASE_URL'] = 'postgres:///iati-ds'
os.environ['DATABASE_URL'] = 'postgres:///iati-datastore'
from iatilib.wsgi import app as application

* Add this inside the `<VirtualHost>` tags of your apache configuration:
Expand Down
2 changes: 1 addition & 1 deletion datastore.wsgi
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import os
os.environ['DATABASE_URL'] = 'postgres:///iati-ds'
os.environ['DATABASE_URL'] = 'postgres:///iati-datastore'
from iatilib.wsgi import app as application

0 comments on commit e7d9b9f

Please sign in to comment.