Skip to content

trustthevote/DCdigitalVBMdist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DC Digital VBM (dist)

Requirements

  • Ruby 1.8+ (tested on Ruby 1.8.7)
  • RubyGems 1.3.6+ (tested on RubyGems 1.3.6)
  • Bundler 0.9.26

Installation (locally)

Get the Bundler:

$ sudo gem install bundler --version=0.9.26

Get the sources:

$ git clone git://github.com/trustthevote/DCdigitalVBMdist.git

Install gem requirements:

$ cd DCdigitalVBMdist
$ bundle install

Configure the database (change your username / password):

$ cp config/database.yml{.sample,}
$ rake db:setup

Configure the application:

$ cp config/config.yml{.sample,}

Start the application:

$ script/server

Sqlite3 Configuration

If you want to try it with Sqlite3 instead of MySQL, follow these steps:

Change Gemfile to contain:

gem 'sqlite3-ruby'

... instead of:

gem 'mysql'

Install gems:

$ bundle install --relock

Change database.yml to:

development:
  adapter: sqlite3
  database: db/development.sqlite3
  pool: 5
  timeout: 5000

Initialize database with:

$ rake db:setup

Start the application:

$ script/server

Deployment (to remote server)

Before you start, make sure that you have:

  • Server IP or domain name you are going to deploy to
  • User account on that server
  • Empty database and username / password to use
  • Apache with Passenger installed on the server

Install Capistrano and Capistrano Ext gems (tested with versions 2.5.19 and 1.2.1):

$ sudo gem install capistrano capistrano-ext

Create the app folder by SSH'ing into the server and creating the directory in your deployment user home (we'll assume it's dc_digital_vbm).

Depending on whether it's your Staging or Production environment, open the config/deploy/staging.rb or production.rb and put in your domain, user and runner info (user and runner are likely to be the same). Next, open config/deploy.rb and change application to the name of the folder that you created under your home.

In the commands below replace with whatever environment (production or staging) you chose to deploy to.

Initialize your application:

$ cap <env> deploy:setup
$ cap <env> deploy:config:db -s dbname=<db> -s username=<dbu> -s password=<dbp>
$ cap <env> deploy:config:app -s email=<email> -s domain=<domain>

... where:

  • db, dbu, dbp -- your database name, username and password
  • email -- support email address that will appear in From fields of letters from the app
  • domain -- domain name the app will be accessible from (i.e. dcdvbm.com)

Perform a cold install:

$ cap <env> deploy:cold

Finally, create a VirtualHost entry in your Apache config and point the DocumentRoot to the public folder of your app.

Statistics

During the normal operation the application records different milestones in user activity, such as:

  • Checking in and confirming identity
  • Finishing the workflow by entering the Thanks page
  • Uploading ballot

At any moment, you can request live statistics by invoking a command-line task:

$ rake vbm:stats

The sample output is:

$ rake vbm:stats
Total number of voters                            : 3201
Inactive                                          : 3200 ( 99.97%)
Used the system but not finished                  : 0 (  0.00%)
Used the system and finished                      : 1 (  0.03%)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published