Git Product home page Git Product logo

analytics's Introduction

Virginia Voter Log Analytics
============================

Requirements
------------

* Ruby 1.9.3
* Sqlite3 (development), MySQL 5+ (production)


Installation
------------

* Get the most recent source code.

* Install required gems:

        $ bundle install

* Start the application server:

        $ rails server thin


Deployment prerequisites
------------------------

* MySQL 5+
* Ruby 1.9.3-p0 (see Installing Ruby section)
* Apache 2 with Passenger 3.0.11 (see Installing Passenger section)


Deployment
----------

* (locally) Copy config/deploy.rb.sample to config/deploy.rb
  * Change "domain" to either IP or domain address of the target system
  * Change "user" / "runner" to the name of the Unix user you will be SSH'ing into the "domain" as
  * Change "branch" to the branch name (i.e. "master", "release" etc)
    or to the release tag (i.e. "1.1", see below "Release tagging" section)

* (locally) Setup the remote location:

    $ cap deploy:setup

* (locally) Verify the setup:

    $ cap deploy:check

* (remotely) Create configuration files:
  * create database for the application (i.e. va_analytics)
  * create <deploy_to>/shared/config/config.yml (see sample in config/config.yml.sample)
  * create <deploy_to>/shared/config/database.yml (see sample in config/database.yml.sample) with only the "production" environment, like this:

      production:
        adapter: mysql2
        database: va_analytics
        host: localhost
        username: <db_user>
        password: <db_password>
        socket: <path_to>/mysql.sock

* (locally) Make initial one-time deployment:

    $ cap deploy:cold

* (locally) Seed the database from db/seed.rb

    $ cap db:seed

* (remotely) Configure Apache virtual host with:

    <VirtualHost *:8888>
      ServerName    server.com
      DocumentRoot  <deploy_to>/current/public
    </VirtualHost>


Release tagging
---------------

To tag a release you:

* (locally) Mark a certain commit on "master" branch:

    $ git tag 1.1

* (locally) Push tags to remote repository:

    $ git push --tags


Installing Ruby
---------------

Detailed installation instructions can be found here:

    http://www.ruby-lang.org/en/downloads/

You can either build it from source code or use RVM.


Installing Passenger
--------------------

Once you have Ruby and Apache 2 installed, to install Passenger you run:

    $ gem install passenger
    $ passenger-install-apache2-module

The installation requires some development libraries of Apache server
and the configuration script will show which of them are missing.

Upon installation, you need to add Passenger module configuration to
your httpd.conf or a separate file in `/etc/httpd/conf.d/passenger.conf`
(recommended).

analytics's People

Contributors

alg avatar ejohnsebes avatar jeffreyvcook avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.