Serving your own Rails project
If you want to serve your own Rails project from a Rails app installed via your Opalstack control panel:
Upload your project directory to your Rails application directory, for example:
SSH to your application's shell user account.
PATHenvironment to your application and then install your project dependencies with
export GEM_HOME=$HOME/apps/myapp/env export PATH=$HOME/apps/myapp/env/bin:$HOME/apps/myapp/newproject/bin:$PATH cd $HOME/apps/myapp/newproject bundle install
stopscripts in your Rails application directory to change the
PROJECTDIRvariable on line 4 to point to your project directory.
For example if your project directory is named
newprojectyou would change this...
# change the next line to your Rails project directory PROJECTDIR='/home/myuser/apps/myapp/myproject'
... to this ...
# change the next line to your Rails project directory PROJECTDIR='/home/myuser/apps/myapp/newproject'
Finally, run the following commands to switch your Rails instance over to your project:
export APPDIR=$HOME/apps/myapp mkdir -p $APPDIR/newproject/tmp/pids cp $APPDIR/oldproject/tmp/pids/* $APPDIR/newproject/tmp/pids/ $APPDIR/stop $APPDIR/start