@@ -498,6 +498,15 @@ start-postgres: ## Run the PostgreSQL 16 docker container
498498 @docker run --rm --name postgres -p 5432:5432 -d -e POSTGRES_PASSWORD=password -e POSTGRES_DB=rollupsdb -v $(CURDIR ) /test/postgres/init-test-db.sh:/docker-entrypoint-initdb.d/init-test-db.sh postgres:18-alpine
499499 @$(MAKE ) migrate
500500
501+ start-aws : # # Run the AWS LocakStack docker container
502+ @echo " Starting AWS localstack"
503+ @docker run --rm --name awslocalstack -p 127.0.0.1:4566:4566 -d -e SERVICES=kms localstack/localstack:4.14.0
504+ @echo " Add the following variables to run integration test with AWS services:"
505+ @echo " export AWS_ACCESS_KEY_ID=test"
506+ @echo " export AWS_SECRET_ACCESS_KEY=test"
507+ @echo " export LOCALSTACK_KMS_ENDPOINT=http://localhost:4566"
508+ @echo " export LOCALSTACK_KMS_REQUIRED=true"
509+
501510start : start-postgres start-devnet # # Start the anvil devnet and PostgreSQL 16 docker containers
502511
503512stop-devnet : # # Stop the anvil devnet docker container
@@ -506,6 +515,9 @@ stop-devnet: ## Stop the anvil devnet docker container
506515stop-postgres : # # Stop the PostgreSQL 16 docker container
507516 @docker stop postgres || true
508517
518+ stop-aws : # # Stop the AWS LocalStack docker container
519+ @docker stop awslocalstack || true
520+
509521stop : stop-devnet stop-postgres # # Stop all running docker containers
510522
511523restart-devnet : # # Restart the anvil devnet docker container
@@ -516,6 +528,10 @@ restart-postgres: ## Restart the PostgreSQL 16 docker container and migrate it
516528 @$(MAKE ) stop-postgres
517529 @$(MAKE ) start-postgres
518530
531+ restart-aws : # # Restart the AWS LocalStack docker container and migrate it
532+ @$(MAKE ) stop-aws
533+ @$(MAKE ) start-aws
534+
519535restart : # # Restart all running docker containers
520536 @$(MAKE ) stop-devnet
521537 @$(MAKE ) stop-postgres
0 commit comments