Skip to content

Instantly share code, notes, and snippets.

@bo-oz
Last active November 22, 2022 12:17
Show Gist options
  • Save bo-oz/ab509873294e61ae422c2814419fc46f to your computer and use it in GitHub Desktop.
Save bo-oz/ab509873294e61ae422c2814419fc46f to your computer and use it in GitHub Desktop.
Docker Compose for Rails + PG + Worker + Faktory
version: '3'
services:
faktory:
image: contribsys/faktory:latest
command: /faktory -b :7419 -w :7420
ports:
- "7419:7419"
- "7420:7420"
db:
image: postgres
web: &web_base
stdin_open: true
tty: true
build: .
volumes:
- .:/your-app-dir
ports:
- "3000:3000"
environment:
PORT: "3000"
PGHOST: "db"
PGUSER: "postgres"
PGDBNAME: "yourdbname"
FAKTORY_URL: tcp://faktory:7419
depends_on:
- db
worker:
<<: *web_base
command: bundle exec faktory-worker
ports: []
depends_on:
- web
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment