Web platform for buying and selling handmade products. Built with Flask and PostgreSQL.
You will need:
- PostgreSQL (download page)
- An AWS Account with an S3 Bucket (for more on how to set up permissions, see this guide on Heroku)
- Clone this repo.
$ git clone https://github.com/blaringsilence/yadawia.git $ cd yadawia
- Install and run virtualenv.
$ pip install virtualenv $ virtualenv -p python3 venv $ . venv/bin/activate
- Install requirements.
$ pip install -r requirements.txt
- Install PostgreSQL (see download page), then create a user, and a database.
$ sudo -u postgres createuser -s $USER -P $ createdb -U $USER yadawia
- Update your venv activation script venv/bin/activate by making it set the environment variables by adding the following lines:
export DATABASE_URL="postgresql+psycopg2://USER:PASSWORD@localhost/yadawia" export AWS_ACCESS_KEY_ID="YOUR/YOUR IAM USER'S AWS ACCESS KEY" export AWS_SECRET_ACCESS_KEY="YOUR/YOUR IAM USER'S SECRET ACCESS KEY" export S3_BUCKET="YOUR BUCKET NAME HERE"
- Create and populate the tables (if files don't have execution permissions
chmod a+x $FILENAME
.$ ./create_db.py $ ./populate_countries.py $ ./populate_currencies.py $ ./populate_reasons.py $ ./populate_categories.py $ ./populate_methods.py
- Run the app.
$ gunicorn yadawia:app