An open API service indexing awesome lists of open source software.

https://github.com/othreecodes/gho-backend

Backend for a digital wallet app
https://github.com/othreecodes/gho-backend

Last synced: 7 months ago
JSON representation

Backend for a digital wallet app

Awesome Lists containing this project

README

          

# gho_backend

[![Build Status](https://travis-ci.org/othreecodes/gho_backend.svg?branch=master)](https://travis-ci.org/othreecodes/gho_backend)
[![Built with](https://img.shields.io/badge/Built_with-Cookiecutter_Django_Rest-F7B633.svg)](https://github.com/agconti/cookiecutter-django-rest)

Gho Backend project. Check out the project's [documentation](http://othreecodes.github.io/gho_backend/).

# Prerequisites

- [Docker](https://docs.docker.com/docker-for-mac/install/)
- [Travis CLI](http://blog.travis-ci.com/2013-01-14-new-client/)
- [Heroku Toolbelt](https://toolbelt.heroku.com/)

# Local Development

Start the dev server for local development:
```bash
docker-compose up
```

Run a command inside the docker container:

```bash
docker-compose run --rm web [command]
```

# Continuous Deployment

Deployment is automated via Travis. When builds pass on the master or qa branch, Travis will deploy that branch to Heroku. Follow these steps to enable this feature.

Initialize the production server:

```
heroku create gho-prod --remote prod && \
heroku addons:create newrelic:wayne --app gho-prod && \
heroku addons:create heroku-postgresql:hobby-dev --app gho-prod && \
heroku config:set DJANGO_SECRET_KEY=`openssl rand -base64 32` \
DJANGO_AWS_ACCESS_KEY_ID="Add your id" \
DJANGO_AWS_SECRET_ACCESS_KEY="Add your key" \
DJANGO_AWS_STORAGE_BUCKET_NAME="gho-prod" \
DJANGO_CONFIGURATION="Production" \
DJANGO_SETTINGS_MODULE="gho.config" \
--app gho-prod
```

Initialize the qa server:

```
heroku create gho-qa --remote qa && \
heroku addons:create newrelic:wayne --app gho-qa && \
heroku addons:create heroku-postgresql:hobby-dev --app gho-qa && \
heroku config:set DJANGO_SECRET_KEY=`openssl rand -base64 32` \
DJANGO_AWS_ACCESS_KEY_ID="Add your id" \
DJANGO_AWS_SECRET_ACCESS_KEY="Add your key" \
DJANGO_AWS_STORAGE_BUCKET_NAME="gho-qa" \
DJANGO_CONFIGURATION="Production" \
DJANGO_SETTINGS_MODULE="gho.config" \
--app gho-qa
```

Securely add your Heroku credentials to Travis so that it can automatically deploy your changes:

```bash
travis encrypt HEROKU_AUTH_TOKEN="$(heroku auth:token)" --add
```

Commit your changes and push to master and qa to trigger your first deploys:

```bash
git commit -a -m "ci(travis): add Heroku credentials" && \
git push origin master:qa && \
git push origin master
```

You're now ready to continuously ship! ✨ 💅 🛳