Landlord - Multi-tenant Spree extension
What is Landlord?
Landlord is a Spree extension that enables hosting multiple store fronts from a single Rails app.
These instructions assume that you already have Spree installed in your Rails app.
Add spree_landlord to your gemfile.
gem 'spree_landlord', github: 'railsdog/spree_landlord'
$ bundle install
$ bundle exec rake spree_landlord:install:migrations
Run migrations. This will create the first tenant, also known as the master tenant. It also moves your data into the tenant as well.
$ bundle exec rake db:migrate
Create a tenant. This will ask you for a
shortname, and a
shortname is used when accessing the tenant by subdomain such as
domain is used to access the tenant with just a domain name, such as
tenan.dev. You'll also be asked if you want to populate the tenant with some sample products.
$ bundle exec rake spree_landlord:tenant:create
Note that it is CRITICAL that you use the latest version of deface in your application's Gemfile. The decorators used in this extension won't work w/ the version of deface that ships in recent versions of spree