Skip to content
This repository has been archived by the owner on Oct 1, 2020. It is now read-only.

Installation

Robby Grossman edited this page Sep 22, 2018 · 10 revisions

Install Steps (Normal)

Prerequisites

  1. Clone the repository into your projects directory
$ git clone git@github.com:seatshare/seatshare-rails /path/to/seatshare-rails`
  1. Install the required gems.
$ bundle install
  1. Install the required JavaScript assets.
$ npm install
  1. Create a .env file and add environment variables
$ cp .env-dist .env
$ vim .env
  1. Create a config/database.yml and add your PostgreSQL credentials if necessary.
$ cp config/database.yml.dist config/database.yml
$ vim config/database.yml
  1. Create the development and test databases and seed the initial data
$ rake db:setup
  1. Run the Rails server to bring up the application
$ rails server

Install Steps (Docker)

Prerequisites

Note: This documentation is incomplete.

  1. Create a .env file and add environment variables
$ cp .env-dist .env
$ vim .env
  1. Create a config/database.yml and add your PostgreSQL credentials if necessary.
$ cp config/database.docker.yml config/database.yml
  1. Bring up Docker containers
docker-compose up -d
  1. Set up databases
docker exec -it seatshare-web /bin/bash
cd /app
bundle exec rake db:setup
exit
  1. Install npm packages (not yet documented)

Recommended: Run Guard

Guard is an automated live-reload and test runner. It saves you from accidentally breaking the build as well as simplifies local development by automatically refreshing your running browser when a file changes. It is installed as part of the default development bundle.

$ bundle exec guard

Optional: Run MailCatcher

MailCatcher is a useful tool for debugging email layout and deliverability issues. It runs by intercepting any outbound email from your development environment and sending it a web browser (typically available at http://localhost:1080/). If you provide set any value for the USE_MAILCATCHER environment variable, the application will route it accordingly. You will need to remember to start MailCatcher along with your application to use it.

$ gem install mailcatcher
$ mailcatcher

Environment Variables

You will use the Dotenv as explained in step 4 above to create a .env file for the required environment variables in local development. The following are used within the application:

  • ADMIN_API_KEY - Simple API key for allowing dashboard access
  • SEATSHARE_S3_KEY - S3 credentials to use for storing ticket files
  • SEATSHARE_S3_SECRET - S3 credentials to use for storing ticket files
  • SEATSHARE_S3_BUCKET - Bucket name to use for storing ticket files
  • SEATSHARE_S3_PUBLIC - Public address for S3 downloads
  • TWILIO_ACCOUNT_SID - Account identifier for Twilio
  • TWILIO_AUTH_TOKEN - Authentication token for Twilio
  • TWILIO_OUTBOUND_NUMBER - Outbound phone number for Twilio

Development Only

  • USE_MAILCATCHER - If set to any value, emails are routed to MailCatcher in development

Production Only

  • MANDRILL_SMTP_USER - User identifier for Mandrill
  • MANDRILL_SMTP_PASS - API key for Mandrill
  • MANDRILL_SMTP_HOST - Hostname to use with Mandrill
  • GOOGLE_ANALYTICS_ID - Google Analytics profile identifier
  • MIXPANEL_API_KEY - API key for Mixpanel