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:
- Visit the app's settings page (e.g. for staging https://dashboard.heroku.com/apps/d2-staging/settings)
- Click "Reveal Config Vars". Use caution when editing these important variables.
- Force open: set or create a
KITCHEN_STATUSvariable toopen - Force closed: set or create a
KITCHEN_STATUSvariable toclosed - Reset to automatic timer: delete the
KITCHEN_STATUSvariable
Command line:
- Force open:
heroku config:set KITCHEN_STATUS=open -a din-marketplace - Force closed:
heroku config:set KITCHEN_STATUS=closed -a din-marketplace - Reset to automatic timer
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.
- Back up staging:
heroku pg:backups capture -r staging - Copy production to staging:
heroku pg:copy din-marketplace::HEROKU_POSTGRESQL_CYAN_URL HEROKU_POSTGRESQL_NAVY_URL -r staging - Sync missing image attachments:
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 thesolidus_frontendgem, 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
StoreCreditTypes or defaultReimbursementTypefrom migrations:20150506181611_create_spree_store_credit_payment_method.rband 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=trueabove, 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:
- Add new dishes
- Edit taxons
- etc
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.