diff --git a/.gitignore b/.gitignore index 0598de0..f176882 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ !.rspec !.slugignore !.travis.yml +!.openshift *~ @@ -66,4 +67,4 @@ brakeman.html # Ignore sensitive data /config/settings/local.rb -/nbproject/private/ \ No newline at end of file +/nbproject/private/ diff --git a/.openshift/action_hooks/start b/.openshift/action_hooks/start new file mode 100644 index 0000000..a2c8532 --- /dev/null +++ b/.openshift/action_hooks/start @@ -0,0 +1,7 @@ +#!/bin/bash +# The logic to start up your application should be put in this +# script. The application will work only if it binds to +# $OPENSHIFT_INTERNAL_IP:8080 +export PATH=$OPENSHIFT_RUNTIME_DIR/bin:$PATH +cd $OPENSHIFT_REPO_DIR +rails server -b $OPENSHIFT_INTERNAL_IP -p $OPENSHIFT_INTERNAL_PORT -d diff --git a/.openshift/action_hooks/stop b/.openshift/action_hooks/stop new file mode 100644 index 0000000..259cea5 --- /dev/null +++ b/.openshift/action_hooks/stop @@ -0,0 +1,4 @@ +#!/bin/bash +# The logic to stop your application should be put in this script. +kill -9 `ps -ef | grep "rails server" | grep -v grep | awk '{ print $2 }'` > /dev/null 2>&1 +exit 0