Skip to content

Add production docker-compose with separate GoodJob worker#124

Merged
xrendan merged 1 commit intomainfrom
feature/separate-goodjob-worker
Mar 27, 2026
Merged

Add production docker-compose with separate GoodJob worker#124
xrendan merged 1 commit intomainfrom
feature/separate-goodjob-worker

Conversation

@xrendan
Copy link
Copy Markdown
Member

@xrendan xrendan commented Mar 27, 2026

Summary

  • Adds docker-compose.prod.yml with separate web and worker services sharing the same image
  • Worker runs bundle exec good_job start as its own container, handling all background jobs and cron scheduling
  • Uses GOOD_JOB_EXECUTION_MODE=external env var so the web process no longer runs jobs inline

Test plan

  • Build image and run docker compose -f docker-compose.prod.yml up
  • Verify web container serves requests and does not execute jobs
  • Verify worker container picks up and executes enqueued jobs
  • Verify cron jobs fire on schedule from the worker

🤖 Generated with Claude Code

@xrendan xrendan force-pushed the feature/separate-goodjob-worker branch 3 times, most recently from d57dfb7 to 6850130 Compare March 27, 2026 22:29
Runs web and worker as separate containers from the same image.
The worker process handles all background jobs and cron scheduling,
keeping the web process focused on serving requests. Uses the
GOOD_JOB_EXECUTION_MODE env var to set external mode.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@xrendan xrendan force-pushed the feature/separate-goodjob-worker branch from 6850130 to a0c4121 Compare March 27, 2026 22:35
@xrendan xrendan merged commit 31cfbfb into main Mar 27, 2026
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant