Skip to content
This repository has been archived by the owner on Oct 31, 2022. It is now read-only.

Developers Guide

Helen Burns edited this page Apr 29, 2019 · 6 revisions

Developers Guide

🚧 Under development 🚧

  1. clone repo
  2. conda env create -f fortis.yml 2b. conda activate fortis
  3. Initialise postgres data base if not done already initdb -D ~/postgresdata/ 3b. if you already have a different postgress folder modify .env accordingly
  4. source .env
  5. createdb FORTIS
  6. edit layout.html (comment out script with comment <!-- FORCE https script -->) not for local servers
  7. python manage.py db upgrade
  8. CEMAC staff - Decrypt credentials.json. Others - follow Google API instructions to generate credentials file
  9. python manage.py runserver
  10. make your edits and test
  11. Update requirements.txt etc conda env export | grep -v "^prefix: " > fortis.yml
  12. edit layout.html (uncomment out script with comment <!-- FORCE https script -->) gives https capability on heroku
  13. Follow generating users guide

Heroku

  1. Prerequiste - have heroku account and in install CLI
  2. heroku login
  3. heroku create --remote staging --app fortis-training
  4. git config heroku.remote staging
  5. git push heroku <branch name> I ofter

Pipenv vs conda

NB app was set up as pipenv installed packages - requires effort to switch this Options update dependencies on live app:

  1. Switch to conda on heroku - possible but perhaps why risk breaking something that works
  2. make a pip install-able requiremnts.txt and create a pip env and lock from that
    • i.e remove =py[a-z,0-9]{2,}_[0-0]{1,}
    • replace = with ==
    • replace "== with "<= in generated pipfile
    • run pipenv install --skip-lock to install packages
  3. small changes simply edit Pipfile manually
Clone this wiki locally