Skip to content

ashmckenzie/percheron-rails

Repository files navigation

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

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/
```

About

Rails stack using Percheron (Docker)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published