Skip to content

Commit

Permalink
Merge pull request #689 from alphagov/sav2-queue
Browse files Browse the repository at this point in the history
Add message queue setup and worker for `search-api-v2`
  • Loading branch information
csutter authored Sep 19, 2023
2 parents 1770c94 + 37b07ef commit f1640af
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions projects/search-api-v2/Makefile
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
search-api-v2: bundle-search-api-v2
$(GOVUK_DOCKER) run $@-lite bundle exec rake message_queue:create_queue
13 changes: 13 additions & 0 deletions projects/search-api-v2/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,17 @@ volumes:
services:
search-api-v2-lite:
<<: *search-api-v2
depends_on:
- rabbitmq
environment:
RABBITMQ_URL: amqp://guest:guest@rabbitmq

search-api-v2-app:
<<: *search-api-v2
depends_on:
- nginx-proxy
- rabbitmq
- search-api-v2-worker-consume-published-documents
environment:
RABBITMQ_URL: amqp://guest:guest@rabbitmq
RAILS_DEVELOPMENT_HOSTS: search-api-v2.dev.gov.uk
Expand All @@ -31,3 +36,11 @@ services:
expose:
- "3000"
command: bin/rails server --restart

search-api-v2-worker-consume-published-documents:
<<: *search-api-v2
depends_on:
- rabbitmq
environment:
RABBITMQ_URL: amqp://guest:guest@rabbitmq
command: bin/rails message_queue:consume_published_documents

0 comments on commit f1640af

Please sign in to comment.