Skip to content

Instantly share code, notes, and snippets.

@adrianomargarin
Created March 21, 2018 17:07
Show Gist options
  • Save adrianomargarin/85910ab9a93a9e797985c8c1b0fdb24d to your computer and use it in GitHub Desktop.
Save adrianomargarin/85910ab9a93a9e797985c8c1b0fdb24d to your computer and use it in GitHub Desktop.

<README.md>

Como desenvolver?

  1. Clone o repositório.
  2. Crie um virtualenv com Python 3.6
  3. Ative o virtualenv.
  4. Instale as dependências.
  5. Configure a instância com o .env
  6. Execute os testes.
  7. Execute o runserver.
git clone <git>
cd <git>
virtualenv env --python=python3 # python 3.6 ou mais atual
source env/bin/activate
pip install -r requirements_dev.txt
cp contrib/env-sample .env
coverage run --source='.' manage.py test --verbosity=2 && coverage report --show-missing
python manage.py runserver

Como fazer o deploy?

  1. Crie uma instância no heroku.
  2. Envie as configurações para o heroku.
  3. Define um SECRET_KEY segura para instância.
  4. Defina DEBUG=True
  5. Configure o serviço de email.
  6. Envie o código para o heroku.
heroku create minhainstancia

heroku config:push
heroku config:set SECRET_KEY=`python contrib/secret_gen.py`
heroku config:set DEBUG=False

git push heroku master --force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment