Skip to content

Commit

Permalink
update requirements and config for postgres
Browse files Browse the repository at this point in the history
  • Loading branch information
F483 committed Sep 13, 2015
1 parent a795a5c commit 034c95e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ How to install and run on a clean install of Ubuntu 14.04 (LTS):
sh
apt-get update
apt-get upgrade
apt-get install screen git python3 python-pip python-dev -y
apt-get install screen git python3 libpq-dev python3-dev -y
git clone https://github.com/Storj/dataserv
cd dataserv
python setup.py install
Expand Down
11 changes: 10 additions & 1 deletion dataserv/config.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
import os
import logging


MAX_PING = 15 # seconds
ONLINE_TIME = 5 # minutes
SQLALCHEMY_DATABASE_URI = "sqlite:///dataserv.db"


# db setup example `export DATABASE_URL="postgresql://localhost/dataserv"`
if os.environ.get("DATASERV_DATABASE_URI"):
SQLALCHEMY_DATABASE_URI = os.environ.get("DATASERV_DATABASE_URI")
else: # default to sqlite
SQLALCHEMY_DATABASE_URI = "sqlite:///dataserv.db"


DATA_DIR = 'data/'
BYTE_SIZE = 1024*1024*128 # 128 MB FIXME rename, very confusing name
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ Flask-Cache == 0.13.1
Flask-Migrate == 1.5.1
gunicorn == 19.3.0
storjcore == 0.0.3
psycopg2

0 comments on commit 034c95e

Please sign in to comment.