Skip to content

Commit

Permalink
fix: #2256, docs for ARPA worker
Browse files Browse the repository at this point in the history
- fix up docs as per code review
- revert a comment
  • Loading branch information
tzinckgraf committed Dec 6, 2023
1 parent 4352626 commit a8ec4c2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ services:
container_name: "gost-localstack_main"
image: localstack/localstack
ports:
- 4566:4566 # SQS
- 4566:4566 # LocalStack Gateway
- 4510-4559:4510-4559 # external services port range
environment:
- DEBUG=${DEBUG-}
Expand Down
15 changes: 11 additions & 4 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,17 @@ the `./docker/postgres/persistence:/bitnami/postgresql` volume mount is enabled.


### Create SQS queues in localstack
SQS queues should automatically be setup from the `localstack/entrypoint/init-aws.sh` script.
This script gets run by localstack after the container is setup.

In order to test certain parts of the application with docker, you may need to use SQS queues.
This is setup in the code using environment variables.
To confirm evreything is working well, run the following locally (you may need the `aws cli` locally)
```
aws --region us-west-2 --endpoint http://localhost:4566 sqs list-queues
```

To setup the queues, go to the docker container and create the queue
If the queue is not setup, first check that you have an updated version of localstack.

If you have an updated version, but still need to setup the queuse, run the below commands.
```
docker ps
# assuming the localstack container name is gost-localstack_main
Expand All @@ -180,9 +186,10 @@ bash-5.0# awslocal sqs list-queues
```
Now we can use that queue name and set it as the environment variable `ARPA_AUDIT_REPORT_SQS_QUEUE_URL`.

To check that you can access the queues locally, you can use the `aws cli`
To confirm that you can access the queues locally, use the `aws cli` again
```
aws --region us-west-2 --endpoint http://localhost:4566 sqs list-queues
```
For this to work, you must have `AWS_ACCESS_KEY_ID=test` and `AWS_SECRET_ACCESS_KEY=test`.
This is part of the standard localstack setup.

0 comments on commit a8ec4c2

Please sign in to comment.