Skip to content

Commit

Permalink
Readme improvement to resolve #12
Browse files Browse the repository at this point in the history
Add sample-env with the environments vars
  • Loading branch information
paulo-romano authored and dirtycoder committed Jun 2, 2016
1 parent f84419f commit cb28487
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 3 deletions.
26 changes: 23 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,27 @@ to improve the site performance.

It's still a work in progress

In order to make development and deploy to production simpler there's two settings module.
'dev' for development and 'prod' for production, both based on the 'base' settings.

Look in the settings modules for environment variables which need to be configured.
### How to contribute to the project

1. Fork and clone the repository;
2. Configure your instance (python-decouple);
* Remember to configure the username, password and database in your postgreSQL.
3. Install Pillow dependencies;
4. Install PhantonJS, see the julionc [tutorial](https://gist.github.com/julionc/7476620);
5. Install project requirements;
6. Execute all tests, it will take some minutes.

```console
git clone https://github.com/<username>/pets.git && cd pets
cp contrib/sample-env pets/.env
sudo apt-get install python-dev python3.x-dev libjpeg8-dev
#Install PhantomJS
pip install -r requirements.txt
cd pets && python manage.py test
```

__Some observations:__
* Use Python 3.4 or newer;
* In order to make development and deploy to production simpler there's two settings module 'dev' for development and 'prod' for production, both based on the 'base' settings.
* Do not make changes if some test fail. Ask for help.
14 changes: 14 additions & 0 deletions contrib/sample-env
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
DJANGO_SETTINGS_MODULE=pets.settings.dev
DB_NAME=pets
DB_USERNAME=postgres
DB_PASSWORD=postgres
DB_IP=127.0.0.1
DB_PORT=5432
DB_ENGINE=django.db.backends.postgresql_psycopg2
DB_CONN_MAX_AGE=0
SECRET_KEY=dummy_key
ALLOWED_HOSTS=127.0.0.1, .localhost
EMAIL_PORT=0
EMAIL_HOST=example.com
EMAIL_HOST_PASSWORD=example
EMAIL_HOST_USER=dummy@example.com

0 comments on commit cb28487

Please sign in to comment.