Skip to content

mariamrf/yadawia

Repository files navigation

Yadawia

Documentation Status

Web platform for buying and selling handmade products. Built with Flask and PostgreSQL.

Quick Install

You will need:

  1. Clone this repo.
      $ git clone https://github.com/blaringsilence/yadawia.git
      $ cd yadawia
  2. Install and run virtualenv.
      $ pip install virtualenv
      $ virtualenv -p python3 venv
      $ . venv/bin/activate
  3. Install requirements.
      $ pip install -r requirements.txt
  4. Install PostgreSQL (see download page), then create a user, and a database.
      $ sudo -u postgres createuser -s $USER -P
      $ createdb -U $USER yadawia
  5. 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"
  6. 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
  7. Run the app.
      $ gunicorn yadawia:app