-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add public information about local development on audit endpoints (#495)
- Loading branch information
1 parent
718c64f
commit f8239bc
Showing
3 changed files
with
39 additions
and
1 deletion.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Setting up Audit Database | ||
|
||
When running locally, the audit endpoints require a Dynamo DB service to be running on port 8000. | ||
|
||
The service hosts a database holding a table that stores audit logs. | ||
|
||
To make this table available for testing auditing functionality: | ||
|
||
1. Start Docker | ||
2. Start up a local Dynamo DB container: | ||
```shell | ||
cd local-dev | ||
docker-compose up -d | ||
``` | ||
3. Create the audit table schema by running [Creation test](https://github.com/guardian/janus-app/blob/f522bca83d9d90657634b038c7734a9871974161/test/aws/AuditTrailDBTest.scala#L48-L50). | ||
4. Populate the table with some test data by running [Insertion test](https://github.com/guardian/janus-app/blob/f522bca83d9d90657634b038c7734a9871974161/test/aws/AuditTrailDBTest.scala#L16-L46). |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
services: | ||
dynamo: | ||
container_name: local-dynamodb | ||
image: amazon/dynamodb-local | ||
networks: | ||
- local-dynamodb | ||
ports: | ||
- "8000:8000" | ||
volumes: | ||
- ${HOME}/.gu/janus-app/data:/home/dynamodblocal/data | ||
working_dir: /home/dynamodblocal | ||
command: "-jar DynamoDBLocal.jar -sharedDb -dbPath data" | ||
|
||
networks: | ||
local-dynamodb: | ||
name: local-dynamodb |