din-co / d2

Solidus-based commerce application
0 stars 2 forks source link

d2

Solidus-based commerce application.

Note: forcing the kitchen open or closed

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:

Command line:

Development server:

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.

Seeing email in development:

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.

Syncing production data to staging (notes for posterity)

How to Override Templates (FAQ)

Dev Env Setup

  1. 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 default ReimbursementType from migrations: 20150506181611_create_spree_store_credit_payment_method.rb and the next two in sequence. That's OK.

  2. 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"])'
  3. Start server (also starts mailcatcher).

    $ heroku local --port 3000 --procfile Procfile.dev
  4. Login to the Admin using admin@din.co/password (only created in development)

  5. Add new dishes!

Rebuild images

bundle exec rake paperclip:refresh:thumbnails CLASS=Spree::Image
bundle exec rake paperclip:refresh:thumbnails CLASS=Spree::Taxon

Editorial Guidelines

View the Admin Editorial Guide to learn to:

Dev Template Editing

Templates for editing can be found by viewing these bundles:

bundle show solidus_core
bundle show solidus
bundle show solidus_frontend

SSL Setup

Most infrastructure setup steps are described here: https://devcenter.heroku.com/articles/ssl-endpoint

Key, CSR, and cert are stored in a 1Password vault.