Solidus-based commerce application.
Set the environment variable KITCHEN_STATUS
to either open
or closed
to force that behavior, regardless of the automatic timer. The kitchen will stay in the overridden state until the KITCHEN_STATUS
variable is unset.
Heroku Dashboard:
KITCHEN_STATUS
variable to open
KITCHEN_STATUS
variable to closed
KITCHEN_STATUS
variableCommand line:
heroku config:set KITCHEN_STATUS=open -a din-marketplace
heroku config:set KITCHEN_STATUS=closed -a din-marketplace
heroku config:unset KITCHEN_STATUS -a din-marketplace
Your choice: heroku local --port 3000 --procfile Procfile.dev
to see the website at http://localhost:3000 (which also launches mailcatcher
on http://localhost:3100) or if you can't be bothered, rails server
will run just the website.
N.B.: There is a canonical redirect to local.flavvor.co
in development mode. You may add an entry to your /etc/hosts
file for local.flavvor.co 127.0.0.1
if you need to access the development site without internet access.
gem install mailcatcher -- --with-cppflags=-I/usr/local/opt/openssl/include
(flags necessary on OS X El Capitan) and then run mailcatcher
from the command line.
heroku pg:backups capture -r staging
heroku pg:copy din-marketplace::HEROKU_POSTGRESQL_CYAN_URL HEROKU_POSTGRESQL_NAVY_URL -r staging
aws s3 sync --acl public-read --storage-class REDUCED_REDUNDANCY s3://din-shop-img/spree/ s3://din-shop-img/staging/spree/
Where are the templates to copy?
$ bundle show solidus_frontend
Where do I copy them to?
Into your local copy, under app/views/...
in the same place as they are in the solidus_frontend
gem, e.g.:
$ mkdir -p app/views/spree/home
$ cp $(bundle show solidus_frontend)/app/views/spree/home/index.html.erb app/views/spree/home
Create and seed the database
$ git pull
$ bundle
$ INCLUDE_SAMPLES=true bin/rake db:create db:schema:load db:seed
Omit sample restaurants, chefs, and meals by removing INCLUDE_SAMPLES=true
.
Reset your DB to the starting state with bin/rake db:reset
.
Note: This does not create the two StoreCreditType
s or default ReimbursementType
from migrations: 20150506181611_create_spree_store_credit_payment_method.rb
and the next two in sequence. That's OK.
Create sample products:
Product Name and price are required. Description is optional.
You must have restaurant and chef taxons for this to work. If you used INCLUDE_SAMPLES=true
above, then you will have sample restaurant and chef taxons.
$ bin/rails r 'ProductFactory.create!("Your Product Name", 30, desc: "Description.", allergens: ["peanuts"])'
Start server (also starts mailcatcher).
$ heroku local --port 3000 --procfile Procfile.dev
Login to the Admin using admin@din.co
/password
(only created in development)
Add new dishes!
bundle exec rake paperclip:refresh:thumbnails CLASS=Spree::Image
bundle exec rake paperclip:refresh:thumbnails CLASS=Spree::Taxon
View the Admin Editorial Guide to learn to:
Templates for editing can be found by viewing these bundles:
bundle show solidus_core
bundle show solidus
bundle show solidus_frontend
Most infrastructure setup steps are described here: https://devcenter.heroku.com/articles/ssl-endpoint
Key, CSR, and cert are stored in a 1Password vault.