Running OpenBrewComp
Initial testing should be performed in a development/test environment on
your local system. A development environment is commonly started by
running script/server, but if you have another development
environment set up, e.g., you are using Phusion Passenger for your
development work, then use whatever you are accustomed to using for
developing a Rails application.
Deployment
Once you have modified the OpenBrewComp code for your competition’s needs, you
need to deploy it to your production server. A sample config/deploy.rb
file for use with Capistrano is provided.
Read the comments in the file and make the appropriate changes as required for
your environment before attempting a deployment. After making the appropriate
changes to deploy.rb and creating your production database, the
initial deployment can be performed easily with the following steps:
cap deploy:setup cap deploy:bootstrap
Past versions of the software have been deployed using mongrel as the application server, but more recently Phusion Passenger has been used instead.
Replicating the Development Data in Production
During your development testing, you may have made changes to the contents of the database that you’d rather not have to replicate in the production environment. Never fear, if you don’t want to do a low-level database copy, you can easily dump the development data and load it into your production system.
- Begin by logging in as the administrative user to your development environment. Go to the main Administration page. Look under the Registration column, find the link labeled Exports, and click it.
- On the main exports page, click the link labeled Full export to YAML. This will generate a zip file containing the contents of your development database. Save it to disk.
- Next, log in as the administrative user to your development environment and go to the main Administration page. Under the Site Maintainance column, find the link labeled Imports and click it.
- On the main imports page, click the link labeled Import Competition Database, enter the name of the zip file you downloaded in step 2, and press the Import button. When the import completes, your production database will contain the same contents as your development database (except for any changes you may have made to the administrator’s account).
Should your competition site not have Internet access, you can load the production database onto a computer to be used at the competition site by following the same steps.