Docker Compose Example

This example demonstrates how to use Jobly inside a docker container and with docker compose.

Code

Dockerfile
docker-compose.yml
app/jobs/hello.rb
FROM dannyben/alpine-ruby
RUN gem install jobly
WORKDIR /app
COPY app .

Commands to Try

cd examples/docker-compose
# Build the images
docker-compose build
# Start the server and the worker
docker-compose up web worker
# Visit your server
open http://localhost:3000
# Send a test job
docker-compose run send
# ... or with parameters
docker-compose run send Hello name:Bobby