Browse Source

Add OpenShift hooks

development
Graham Kaplan 11 years ago
parent
commit
a2f2f630a4
  1. 1
      .gitignore
  2. 7
      .openshift/action_hooks/start
  3. 4
      .openshift/action_hooks/stop

1
.gitignore

@ -5,6 +5,7 @@
!.rspec
!.slugignore
!.travis.yml
!.openshift
*~

7
.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

4
.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
Loading…
Cancel
Save