Phoenix Racing Fabrication is a web-based system for tracking parts through the manufacturing cycle. It stores information about parts' current manufacturing status and allows users to claim parts and complete different steps in the manufacturing process.
Phoenix Fab is written in Ruby using the Sinatra framework and uses MySQL as the backing datastore. Development and production are run on UNIX (OS X and Ubuntu), so there are no guarantees it'll work on Windows, sorry.
Prerequisites:
- Ruby 1.9 (1.9.3-p286 is what we use in development and production)
- Bundler
- MySQL
To run Phoenix Fab locally:
- Create an empty MySQL database and a user account with full permissions on it.
- Populate
config/environment.rb
with the parameters for the development environment. This file is overwritten on deploy with the parameters in the Rakefile, so it's okay to set the development values in it and then forget about it. - Run
bundle install
. This will download and install the gems that Phoenix Fab depends on. - Run
bundle exec rake db:migrate
. This will run the database migrations to create the necessary tables in MySQL. - Run
ruby parts_server_control.rb <command>
to control the running of the Phoenix Fab server, where<command>
can be one ofstart
|stop
|run
|restart
.
The database migration will create an admin account (username "deleteme@phoenix.com", password "baja") that you can use to first get into the system and create other accounts. It is highly recommended that you delete this account after having created your own admin account.
OLIN BAJA ECE HAS NOT GOTTEN TO HERE YET. The following instructions have not been tested and may not work correctly.
The Cheesy Parts codebase includes Fezzik scripts for deploying to a remote server via SSH. To deploy:
- Set up the remote server with the same prerequisites and procedure as for development.
- Set up the remote server for password-less (public-key) login.
- Fill in the hostname, database credentials and other parameters in the Rakefile.
- Run
bundle exec fez prod deploy
.
This last command will create the remote directory structure, copy the code over, install the necessary gems, run the database migrations, and start the server on the port specified in the Rakefile.
If you have a suggestion for a new feature, create an issue on GitHub or shoot an e-mail to pat@patfairbank.com. Or if you have some Ruby-fu and are feeling adventurous, fork this project and send a pull request.