Clone this repository:
$ git clone https://github.com/connormakh/garbage.gitCreate a virtual environment to run this project in an isolated python3 container
$ virtualenv garbage-envIf you don't have Autoenv, install it globally, outside of your virtual env:
$ pip install autoenvCreate a .env file to automatically load your virtual environment whenever you cd into it. Add the following to your .env file:
source bin/activate
export FLASK_APP="garbage/run.py"
export SECRET="some-very-long-string-of-random-characters-CHANGE-TO-YOUR-LIKING"
export APP_SETTINGS="development"
export DATABASE_URL="postgresql://localhost/garbage-db"
Make sure to source your .env code once done:
$ source .envCreate a instance/vars.py file, with the following:
FLASK_APP="garbage-backend/run.py"
SECRET="some-very-long-string-of-random-characters-CHANGE-TO-YOUR-LIKING"
APP_SETTINGS="development"
DATABASE_URL="postgresql://localhost/garbage-db"
MONGO_URL="mongodb://localhost/garbage-db"
MAIL_SERVER="smtp.gmail.com"
MAIL_PORT=587
MAIL_PASSWORD="********"
MAIL_USERNAME="garbagemanlau@gmail.com"Install dependancies using pip:
$ pip install -r requirements.txtThis project uses postgreSQL, so make sure you have that on your machine before moving forward.
Initialize the database:
$ createdb garbage-dbMigrate and upgrade your database:
$ python3 manage.py db init
$ python3 manage.py db migrate
$ python3 manage.py db upgrade...TODO