Giter Site home page Giter Site logo

spree-heroku's Introduction

Spree on Heroku

This is an extension for Spree, allowing the e-commerce system to run on Heroku - http://heroku.com.

The major constraint on Heroku is that we can't write files to disk, so this extension disables all disk caching, fixes a few issues and changes Spree to store on Amazon S3.

Requirements

A Heroku account and an Amazon S3 account with a bucket.

Installation and configuration

Make a Spree application:

spree myapp

Install this extension:

cd myapp
script/extension install git://github.com/RSpace/spree-heroku.git

Copy the .gems manifest to the root of your application:

cp vendor/extensions/heroku/.gems ./

Configure the extension with your S3 information.

You can either specify the S3 credentials via Heroku's environment variables (recommended):

heroku config:add S3_KEY=[your S3 key]
heroku config:add S3_SECRET=[your S3 secret]
heroku config:add S3_BUCKET=[your S3 bucket]
  • or you can use a YAML file:
cp vendor/extensions/heroku/config/aws_s3.yml.example vendor/extensions/heroku/config/aws_s3.yml

Enter your S3 configuration to vendor/extensions/heroku/config/aws_s3.yml

Create a Heroku application and deploy it:

git init
git add .
git commit -m 'Initial create'
heroku create --stack bamboo-ree-1.8.7 myapp
git push heroku master

Enable SSL, since Spree uses SSL for administration and payment flow in its standard setup:

heroku addons:add "Piggyback SSL"

Bootstrap the database locally (not possible in Heroku, because the rake task attempts to copy files), and transfer it to Heroku:

rake db:bootstrap
heroku db:push

Please note that if you choose to load sample data, images will be missing for all products. Spree's bootstrap task copies the images locally, but it doesn't put them on S3, where this extension configures Spree to look for images.

That's it - you're done! :)

Troubleshooting

This extension has been tested with Spree 0.10.2. If you have problems using the extension with a newer version of Spree, it could be due to Spree's gem dependencies having changed. The gems in the heroku .gems manifest must mach the gems and versions required by Spree. This page shows the current dependencies of the newest version of Spree: http://gemcutter.org/gems/spree

Copyright and license

Copyright (c) 2009 Casper Fabricius, released under the MIT license

Contributors:

  • Pavel Chipiga
  • Andrey Voronkov

spree-heroku's People

Contributors

antiarchitect avatar chipiga avatar rspace avatar taweili avatar tobinharris avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

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.