Last active
November 22, 2022 12:17
-
-
Save bo-oz/ab509873294e61ae422c2814419fc46f to your computer and use it in GitHub Desktop.
Docker Compose for Rails + PG + Worker + Faktory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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