- Download the code with git
git clone https://github.com/storrellas/cryptoviewer.git
- Create migrations
python manage.py makemigrations viewer
- Create entities
python manage.py migrate viewer
- Run server
python runserver
- Open browser and go to
https://localhost:8000/views/instrument/
-
Views are place under viewer\views.py
-
URL paths are place under viewer\urls.py
-
Commands are placed under
viewer\management\commands\retrieval_instruments.py
viewer\management\commands\retrieval_trades.py
- Create heroku app
heroku apps:create cryptoviewer-release
- Append addon
heroku addons:create heroku-postgresql
- Insert config variables
heroku config
- Run bash into dyno
heroku run bash
./manage.py makemigrations viewer
./manage.py migrate viewer
- Create environment
heroku config:set DERIBIT_KEY='joesmith'
[...]
DERIBIT_KEY = os.environ.get('DERIBIT_KEY', None)
[...]
- See Logs
sudo heroku logs -t --app=cryptoviewer-release
- SSH into dyno (does not include config vars)
heroku ps:exec --app=cryptoviewer-release
- Generate one-off dyno (includes config vars)
heroku run bash --app=cryptoviewer-release
- Login container
heroku container:login
- Create app
heroku create --app=cryptoviewer-docker
- Push image
sudo docker tag cryptoviewer registry.heroku.com/cryptoviewer-docker/web
sudo docker push registry.heroku.com/cryptoviewer-docker/web
- Release
sudo heroku container:release web --app=cryptoviewer-docker