Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FPO-194: Add docker-compose + LocalStack (www.localstack.cloud) #19

Closed
wants to merge 2 commits into from

Conversation

alexdesi
Copy link

Jira link

https://transformuk.atlassian.net/browse/FPO-194

What?

Recreated docker-compose.yml from the Readme
Added localstack in the services section in the docker-compose.yml
Added localstack-setup.sh to initialise the local AWS services that we need
DONE:
-[x] dynamodb

TODO:
-[] API Gatway
-[] other?!?

Why?

So we don't need to setup AWS services to manually or run integration-test

Comment on lines 51 to 58
localstack:
image: localstack/localstack:latest
ports:
- 4566:4566 # loLalStack edge port
- 4510-4559:4510-4559 # maps various AWS services ports
volumes:
# Inizialization Hook (see https://docs.localstack.cloud/references/init-hooks/)
- ./localstack-setup.sh:/etc/localstack/init/ready.d/script.sh
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

localstack:
image: localstack/localstack:latest
ports:
- 4566:4566 # loLalStack edge port
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 4566:4566 # loLalStack edge port
- 4566:4566 # localStack edge port

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOLstack 🤣

- 4566:4566 # loLalStack edge port
- 4510-4559:4510-4559 # maps various AWS services ports
volumes:
# Inizialization Hook (see https://docs.localstack.cloud/references/init-hooks/)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Inizialization Hook (see https://docs.localstack.cloud/references/init-hooks/)
# Initialization Hook (see https://docs.localstack.cloud/references/init-hooks/)

AttributeName=FpoId,KeyType=RANGE \
--provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5

echo "Creating API Gateway..."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you thinking you want to do this part in a separate PR?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

basically I don't know how to do that 😅
need to dig a bit more on the current AWS setting and replicate it in here

@@ -0,0 +1,69 @@
version: "2"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I think we can just embed these two configuration files as part of https://github.com/trade-tariff/trade-tariff-tech-docs/blob/main/source/manual/get-started.html.md

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That way, when we have a new dev starting they can copy this file into ~

@willfish
Copy link
Member

So I think we'll want:

  1. Something in the get-started.md detailing how to setup a local aws profile (maybe a separate linkable manual for this?)
  2. The script and the docker-compose file could probably also go in that manual?

@willfish willfish closed this May 20, 2024
@willfish willfish deleted the FPO-194-setup-localstack branch May 20, 2024 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants