Skip to content

cogsec-collaborative/Amittsite

Repository files navigation

Amittsite

Amitt website code - makes AMITT framework objects accessible to non-technical people.

Written in Python, Flask, D3.

How to make this run

Running locally - getting set up

Running locally

  • . venv/bin/activate;
  • export FLASK_APP=amittsite; export FLASK_ENV=development; export DATABASE_URL2="postgresql:///amittsite"
  • flask run
  • go to http://127.0.0.1:5000/

Running on Heroku - getting set up

  • Create a heroku account. Create an app.
  • Click on the app, then the resources tab. Add the Postgres add-on.
  • go to https://dashboard.heroku.com/apps//settings
  • click "reveal config vars"
  • Edit DATABASE_URL: take a copy of it. It will start with "postgres://"
  • Create DATABASE_URL2: copy DATABASE_URL into it, but start it with start with "postgresql://" instead

Running on Heroku - updating Heroku code and database

  • pg_dump -Fc -h localhost -U amittsite > amittsite.dump  
  • heroku pg:reset -a    
  • heroku pg:push amittsite DATABASE_URL -a  
  • git add .; git commit -m "heroku stuff"; git push heroku main

Database notes

Releases

No releases published

Packages

No packages published