Skip to content

Commit d7d657e

Browse files
lethaalerosa
authored andcommitted
Add instructions to run with a single database
1 parent dab31d9 commit d7d657e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

+10
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,16 @@ Now you're ready to start processing jobs by running `bin/jobs` on the server th
5151

5252
For small projects, you can run Solid Queue on the same machine as your webserver. When you're ready to scale, Solid Queue supports horizontal scaling out-of-the-box. You can run Solid Queue on a separate server from your webserver, or even run `bin/jobs` on multiple machines at the same time. Depending on the configuration, you can designate some machines to run only dispatchers or only workers. See the [configuration](#configuration) section for more details on this.
5353

54+
### Single database configuration
55+
56+
It's also possibile to use one single database for both production data:
57+
58+
1. Shovel `db/queue_schema.rb` into a normal migration and delete `db/queue_schema.rb`
59+
2. Remove `config.solid_queue.connects_to` from `production.rb`
60+
3. Migrate your database. You are ready to run `bin/jobs`
61+
62+
You won't have multiple databases, so `database.yml` doesn't need to have primary and queue database.
63+
5464
## Incremental adoption
5565

5666
If you're planning to adopt Solid Queue incrementally by switching one job at the time, you can do so by leaving the `config.active_job.queue_adapter` set to your old backend, and then set the `queue_adapter` directly in the jobs you're moving:

0 commit comments

Comments
 (0)