Awesome
Percheron Rails stack example
This repo contains a complete Rails stack for use with Percheron.
The stack contains a Rails application that has a simple form that accepts and email address. Once the form is posted, a Sidekiq job is enqueued, processed and an email sent! This simple flow touches all containers below.
Containers included
- base (used by all containers)
- consul - installed on all containers, used by HAProxy
- postfix - used by Sidekiq
- postgres - used by Rails app
- redis - used by Sidekiq
- HAproxy - for load balancing
- Sidekiq
- Email Test Rails app
Dependancies
- Percheron
- Boot2Docker v1.6.x+
- Docker client (nice to have)
Quickstart
Start boot2docker
boot2docker up && eval $(boot2docker shellinit) && export BOOT2DOCKER_IP=$(boot2docker ip)
```
Clone the percheron-rails-example repo
```shell
git clone https://github.com/ashmckenzie/percheron-rails
```
Run Percheron!
```shell
cd percheron-rails && bundle install && bundle exec percheron start rails
```
Fill out the form and wait for the email! :)
```shell
open http://${BOOT2DOCKER_IP}:1234/
```
## Bonus
The Consul UI is available at:
```shell
open http://boot2docker:8500/ui/
```