We test MiGA Web with Ruby 2.x (MRI). Some gems used in the rails backend are unavailable for Ruby < 2.0.
First, make sure you have bundle:
gem install bundle
Next, get miga-web
and all its dependencies:
git clone https://github.com/bio-miga/miga-web.git
cd miga-web
bundle
Once your MiGA Web is ready, you can start the server. First, prepare the system:
# Tell rails this is a production server
export RAILS_ENV=production
# create an empty folder to host your projects (it can be anywhere)
mkdir $HOME/miga-data
# Configure server secret credentials
bin/rails credentials:edit
# Generate the initial database
bundle exec rake db:migrate
# Precompile assets
bundle exec rake assets:precompile
Next, configure the server. Simply copy config/settings.yml
to
config/settings.local.yml
and modify the necessary variables. If you modified
the data location above (folder to host your projects), make sure to set the
correct path for miga_projects
.
Finally, launch the server. We have had a great experience with Puma, so that's what we use.
export RAILS_SERCE_STATIC_FILES=true
bundle exec rails server -e production -u Puma
Now you can visit your MiGA Web interface at
localhost:3000. To use a world-accessible address,
simply set mail_host
to that address in config/settings.local.yml
, and pass
it to rails using -b and -p. For example, this is how we launch our own
MiGA Web:
export RAILS_SERCE_STATIC_FILES=true
bundle exec rails server -e production -b enve-omics.ce.gatech.edu -p 3000 -u Puma
Once you create your first user from the website, you may want to make it an admin. You can do so from the console:
bundle exec rails console -e production
irb> u = User.find(1) # Change the 1 for the actual ID of your user
irb> u.update(admin: true)
Execute bundle exec rake test
.