-
Notifications
You must be signed in to change notification settings - Fork 7
1.Server deployment guide
Tony Yu Cao edited this page Jul 27, 2019
·
7 revisions
You can use your own server or get a cheap VPS from Digital Ocean started $5 per month. (referral code to be inserted here)
Clone the repository
git clone https://github.com/WRSC/tracking.git
Install ruby
Check this instruction
Install ruby packages
gem install bundler -v 1.16.4
cd MYR_rails
bundle install
export RAIL_ENV=development
bundle exec rake db:migrate
bundle exec rails s
Now you should able to view the website at http://localhost:3000
To update the website for a new competition, both visual front-end and database back-end need to be changed.
-
Most front-end related files are under
/MYR_rails/app/views
folder. -
Database file is under
/MYR_rails/db
folder.- Depends on the mode, you'll see one (development, production, test) of SQLite database there. You do need to configure them manually
- Edit the seed file under
seeds
folder, theseeds2018
is self-explanatory. After that runbundle exec rake db:seed:seeds2018
to add admin users and missions to the competition.
cd MYR_rails # Assume you are under /tracking/MYR_rails folder
export RAIL_ENV=production
bundle exec rake db:migrate
bundle exec rake db:seed:seeds2018 # Replace when necessary
#!/bin/bash
export RAIL_ENV=production
export SECRET_KEY_BASE=... # Fill in a SECRET_KEY key, 'rake secret' can generate one
cd tracking/MYR_rails
bundle exec rails s -e production -b 0.0.0.0 -p 80
Now the website should be running at http://<yourIP/domain>