Skip to content

Commit

Permalink
Update readme, provide procfile for app startup ease
Browse files Browse the repository at this point in the history
  • Loading branch information
Carl Thuringer authored and Naren Chainani committed Mar 31, 2016
1 parent 20d844b commit 317c7d8
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 14 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ tmp
.DS_store
log/*.log
docker/*.env
.idea
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
source ENV.fetch('GEM_SOURCE', 'https://rubygems.org/')
source ENV.fetch('GEM_SOURCE', 'http://rubygems')

gem 'rake'

Expand Down Expand Up @@ -37,6 +37,7 @@ gem 'sidekiq_schedulable', '~> 0.0.3'

group :development, :test do
gem 'pry'
gem 'foreman'
end

group :test do
Expand Down
8 changes: 7 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
GEM
remote: https://rubygems.org/
remote: http://rubygems/
specs:
activemodel (4.1.13)
activesupport (= 4.1.13)
Expand Down Expand Up @@ -67,6 +67,8 @@ GEM
ffi (1.9.10-java)
foreigner (1.7.4)
activerecord (>= 3.0.0)
foreman (0.78.0)
thor (~> 0.19.1)
grape (0.13.0)
activesupport
builder
Expand Down Expand Up @@ -240,6 +242,7 @@ DEPENDENCIES
enumerize
factory_girl
foreigner
foreman
grape (~> 0.13.0)
httparty
jdbc-postgres
Expand All @@ -263,3 +266,6 @@ DEPENDENCIES
warbler
webmock
zip

BUNDLED WITH
1.11.2
3 changes: 3 additions & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
server: bundle exec rackup
sidekiq: bin/sidekiq
redis: redis-server
23 changes: 11 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ $ bin/docker_console
```bash
$ sudo su postgres -c "psql -c \"CREATE ROLE backbeat with SUPERUSER LOGIN PASSWORD 'backbeat'\";"
```

```bash
$ psql -d postgres
# CREATE ROLE backbeat with SUPERUSER LOGIN PASSWORD 'backbeat';
> CREATE ROLE
```

- Note you can change your db configs to what ever you'd like in config/database.yml. The above command allows for the default values in the .yml
- Note, on Lion+ you may already have a postgres user, `_postgres`.
- Note, you might not be able to get this working, so try [Postgres.app](http://postgresapp.com).
Expand Down Expand Up @@ -107,23 +114,15 @@ $ bin/docker_console
$ brew install redis
```
- [Install on Linux](http://redis.io/topics/quickstart)
- Start Redis
```bash
$ redis-server
```
12. Start Web Server and Workers
- For testing you can run these as daemons or in different terminal windows
- For production you will want to use some sort of monitoring on these processes. We provide an option using God as explained [here]().
```bash
$ bundle exec rackup # you can now hit backbeat from http://localhost:9292 or expose the port externally
```

- See the Procfile for a summary of the processes
```bash
$ bin/sidekiq # workers can now pick up async jobs
$ foreman start
```

### Commands

Running the tests:
Expand Down

0 comments on commit 317c7d8

Please sign in to comment.