andela / ah-infinity-stones

BSD 3-Clause "New" or "Revised" License
0 stars 3 forks source link

#161966906 Heroku Deployment #48

Closed leonardnjura closed 5 years ago

leonardnjura commented 5 years ago

What does this PR do?

Description of Task to be completed?

User navigates to provided URLs or endpoints in the browser User should access the live application

How should this be manually tested?

$ git clone -b ch-heroku-deployment-161966906 https://github.com/andela/ah-infinity-stones then $ cd ah-infinity-stones

Create and activate virtual env virtualenv -p python3 venv $ source venv/bin/activate $ pip3 install -r requirements.txt to install the dependencies Setup environment variables. Copy all from below and paste them into the .env file. Update the values to your choice: Locally, Run $ gunicorn authors.wsgi to test On Heroku connect this repository and branch Create postgres hobby dev database On Heroku configure settings vars to match your environment vars Deploy and access endpoints such as:

POST http://127.0.0.1:8000/api/users/ GET http://127.0.0.1:8000/api/profiles/ GET http://127.0.0.1:8000/api/profiles/?page=2 GET http://127.0.0.1:8000/api/profiles/u GET PUT http://127.0.0.1:8000/api/profiles/<username>

Populate your .env with:


export DATABASE_URL=postgres://<database_user>:<database_password>@localhost/<database_name>

 export EMAIL_HOST_USER='sendgrid_username'
 export EMAIL_HOST_PASSWORD='sendgrid_pswd'
 export SECRET_KEY='your_secret'

Activate the env variables by $ source .env Run migrations: $ python3 manage.py makemigrations Run migrations: $ python3 manage.py migrate Run generic tests $ python3 manage.py test Run specific tests $ python3 manage.py test authors/apps/profiles

What are the relevant pivotal tracker stories?

#161966906

Screenshots

screen shot 2018-12-20 at 13 12 01 screen shot 2018-12-20 at 13 12 55 screen shot 2018-12-21 at 12 21 38
codeclimate[bot] commented 5 years ago

Code Climate has analyzed commit 8c1be499 and detected 0 issues on this pull request.

View more on Code Climate.