Code Monkey home page Code Monkey logo

spawnsong.com

Setting up for development

Follow these instructions to run a local copy of the site or to prepare to deploy a remote server.

  • Install Python 2.7
  • Install pip and virtualenv python packages (often you can install both with easy_install virtualenv)
  • Setup a Virtualenv for the project (this is an isolated copy of Python and the required libraries)
    • Make the vitualenv virtualenv ~/envs/reetraining
    • Activate it source ~/envs/reetraining/bin/activate.sh
    • Install the needed python libraries (must be run from project root): pip install -r requirements.txt
  • Install LESS and Yuglify (for the static file procesing pipeline).
    • Install Node.JS
    • Run npm install -g less yuglify

At this point you should have a working Virtualenv, whenever you want to work on the project you must activate it first with source ~/envs/reetraining/bin/activate.sh. You will know this has worked because it will put "(reetraining)" before your shell prompt.

Setting up local settings

For local configuration you can create a local_settings.py file in the sites/spawnsongsite folder. This can be based on local_settings.py.example and should not be added to the repository, it allows you to overide some settings just for your local machine. The example version shows settings for using an sqlite database but for a closer match to the production system you may want to use a local copy of PostgreSQL.

Running a local dev server

Once you're swtiched into the Virtualenv and have your local_settings.py you can run honcho -f ProcfileHoncho start to start the development server. This will also run the Celery server which handles out of process tasks such as transcoding. The web server part will retstart when you make a change but the you will need to manually restart (hit Ctrl-C to shut it down) if you make changes to the Celery tasks.

Thirs Party Components

  • Heroku for hosting
  • Upload storage on Amazon S3
  • File conversion using ffmpeg running on Heroku (use the Linux 64 binary) and run in another process via Celery On Ubuntu you'll probably need to install libavcodec-extra-53 which provides libmp3lame audio codec.
  • Echonest for beat locations
  • Mailgun fo rmail delivery
  • Memcachier for caching
  • Stripe for payments
  • Twitter for login

Heroku Config

Uses a special build pack because we need ffmpeg:

heroku config:add BUILDPACK_URL=https://github.com/almost/heroku-buildpack-python-ffmpeg.git

Needs memcachier addon for memcached

Need the following additonal Heroku config options:

AWS_ACCESS_KEY
AWS_SECRET_ACCESS_KEY
ECHONEST_API_KEY
MAILGUN_ACCESS_KEY
MAILGUN_SERVER_NAME
STRIPE_PUBLIC_KEY
STRIPE_SECRET_KEY
TWITTER_CONSUMER_KEY
TWITTER_CONSUMER_SECRET

spawnsong's Projects

spawnsong doesnโ€™t have any public repositories yet.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.