-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from 2gis/deploy-to-heroku
Deploy to heroku documentation
- Loading branch information
Showing
3 changed files
with
60 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
cmd: gunicorn pycd.wsgi --config config.py -b 0.0.0.0:5000 | ||
web: gunicorn pycd.wsgi --config config.py -b 0.0.0.0:$PORT | ||
beat: python manage.py celery beat -S djcelery.schedulers.DatabaseScheduler |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Badger-api [![Build Status](https://travis-ci.org/2gis/badger-api.svg?branch=master)](https://travis-ci.org/2gis/badger-api) | ||
Badger-api is an open source backend service (REST API) for [Badger] (https://github.com/2gis/badger) (AngularJS web UI). | ||
|
||
# Installation | ||
|
||
### <a href="README.md">Development version</a> | Deploy to Heroku | ||
|
||
Clone repository: | ||
```bash | ||
git clone https://github.com/2gis/badger-api.git | ||
cd badger-api | ||
``` | ||
|
||
Create an app on Heroku: | ||
```bash | ||
heroku create appname | ||
``` | ||
|
||
Install CloudAMQP add-on: | ||
```bash | ||
heroku addons:create cloudamqp | ||
``` | ||
|
||
Configure you app: | ||
```bash | ||
heroku config | grep CLOUDAMQP_URL | ||
heroku config:set BROKER_URL=amqp://user:pass@ec2.clustername.cloudamqp.com/vhost | ||
heroku config:set CDWS_API_HOSTNAME=appname.herokuapp.com | ||
``` | ||
|
||
Sync database: | ||
```bash | ||
heroku run python manage.py syncdb | ||
``` | ||
|
||
Copy worker process from Procfile.dev to Procfile: | ||
```bash | ||
worker: python manage.py celery worker -O fair -l DEBUG | ||
``` | ||
|
||
Save your changes: | ||
```bash | ||
git add . | ||
git commit -m "save my changes" | ||
``` | ||
|
||
Deploy app: | ||
```bash | ||
git push heroku master | ||
``` | ||
|
||
Start processes: | ||
```bash | ||
heroku ps:scale worker=1 beat=1 web=1 | ||
``` | ||
|
||
|