diff --git a/.gitignore b/.gitignore index 0d604bb..e1bd138 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ __pycache__ .coverage* coverage.xml htmlcov +freemusicninja.sqlite diff --git a/README.rst b/README.rst index 0979e72..eed29a5 100644 --- a/README.rst +++ b/README.rst @@ -10,11 +10,11 @@ Free Music Ninja API Requirements ------------ -This project requires `Python 3`_ and `PostgreSQL`_: +This project requires `Python 3`_ and `lxml`_: .. code-block:: bash - $ sudo apt-get install python3-dev libpq-dev postgresql postgresql-contrib + $ sudo apt-get install python3-dev libxml2-dev libxslt1-dev Installation @@ -52,7 +52,7 @@ This project uses environment variables for configuration. 4. ``SECRET_KEY``: `Secret key`_ for cryptographic signing 5. ``DATABASE_URL``: URL for database connection (see `database URL schema`_) -If you don't want to setup Postgres, set ``DATABASE_URL`` to ``sqlite:///freemusicninja.db`` +If you want to setup Postgres, set ``DATABASE_URL`` to ``postgres://postgres:postgres@localhost/freemusicninja`` Database Migrations @@ -114,7 +114,7 @@ There is a deploy task in the Fabric file. Unfortunately Fabric currently requi .. _database url schema: https://github.com/kennethreitz/dj-database-url#url-schema .. _freemusicarchive api: http://freemusicarchive.org/api/ .. _jamendo api: https://developer.jamendo.com/ -.. _postgresql: https://www.python.org/downloads/ .. _python 3: https://www.python.org/downloads/ +.. _lxml: http://lxml.de/ .. _secret key: https://docs.djangoproject.com/en/1.7/ref/settings/#std:setting-SECRET_KEY .. _the echo nest api: https://developer.echonest.com/ diff --git a/circle.yml b/circle.yml index 7bd7a59..27733de 100644 --- a/circle.yml +++ b/circle.yml @@ -4,7 +4,7 @@ machine: dependencies: override: - - pip install -U -r dev-requirements.txt coveralls codecov: + - pip install -U -r dev-requirements.txt -r prod-requirements.txt coveralls codecov: timeout: 60 deployment: diff --git a/fabfile.py b/fabfile.py index 687c313..5df27e0 100644 --- a/fabfile.py +++ b/fabfile.py @@ -13,7 +13,7 @@ def deploy(): with cd(env.directory): run("git fetch") run("git reset --hard origin/master") - sudo("pip3 install -r requirements.txt") + sudo("pip3 install -r requirements.txt -r prod-requirements.txt") sudo("python3 manage.py collectstatic --noinput") sudo("python3 manage.py migrate --noinput", user='django') run("rm -f {deploy_path}".format(deploy_path=env.deploy_path)) diff --git a/freemusicninja/settings.py b/freemusicninja/settings.py index 56e352f..37932e9 100644 --- a/freemusicninja/settings.py +++ b/freemusicninja/settings.py @@ -78,7 +78,7 @@ DATABASES = { 'default': dj_database_url.config( - default='postgres://postgres:postgres@localhost/freemusicninja' + default='sqlite:///freemusicninja.sqlite' ), } diff --git a/prod-requirements.txt b/prod-requirements.txt new file mode 100644 index 0000000..4a49af0 --- /dev/null +++ b/prod-requirements.txt @@ -0,0 +1 @@ +psycopg2==2.5.4 diff --git a/requirements.txt b/requirements.txt index 4d3c30b..213be8c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,7 +10,6 @@ django-model-utils==2.2.0 djangorestframework==3.0.1 iron-celery==0.4.3 lxml==3.4.1 -psycopg2==2.5.4 purl==1.0 raven==5.1.1 requests==2.4.3