Skip to content

Instantly share code, notes, and snippets.

@gor-sg
Last active August 29, 2015 14:09
Show Gist options
  • Select an option

  • Save gor-sg/8d7ac4bb30d7697610f0 to your computer and use it in GitHub Desktop.

Select an option

Save gor-sg/8d7ac4bb30d7697610f0 to your computer and use it in GitHub Desktop.
#!/bin/sh
PROCFILE="mysql: mysqld
elasticsearch: elasticsearch --config=/usr/local/opt/elasticsearch/config/elasticsearch.yml
redis: redis-server /usr/local/etc/redis.conf
sidekiq: bundle exec sidekiq -C './config/sidekiq.yml'
app: bundle exec rails s"
ps aux | grep '[m]ysql\|[e]lasticsearch\|[r]edis\|[r]ails\|[s]idekiq\|[f]oreman' | awk '{print $2}' | xargs kill SIGTERM
echo "$PROCFILE" > ./tmp/Procfile
foreman start --procfile=./tmp/Procfile --root=$(pwd)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment