From 37374e79ba1b3245855a1ea60615ba528b150121 Mon Sep 17 00:00:00 2001 From: Justin Dray Date: Wed, 19 Nov 2025 22:33:43 -0800 Subject: [PATCH] fix: Allow the push-to-ecr.sh script to run from anywhere instead of requiring the user to cd manually (#202) * fix: Allow the push-to-ecr.sh script to run from anywhere instead of requiring the user to cd manually * Add docker-compose to support running locally --- docker-compose.yml | 18 ++++++++++++++++++ scripts/push-to-ecr.sh | 3 +++ 2 files changed, 21 insertions(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..a231a69 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,18 @@ +version: '3.8' + +services: + bedrock-access-gateway: + build: + context: ./src + dockerfile: Dockerfile_ecs + ports: + - "127.0.0.1:8000:8080" + environment: + - ENABLE_PROMPT_CACHING=true + - API_KEY=${OPENAI_API_KEY} + - AWS_PROFILE + - AWS_ACCESS_KEY_ID + - AWS_SECRET_ACCESS_KEY + - AWS_SESSION_TOKEN + volumes: + - ${HOME}/.aws:/home/appuser/.aws diff --git a/scripts/push-to-ecr.sh b/scripts/push-to-ecr.sh index 7139750..2f2d633 100755 --- a/scripts/push-to-ecr.sh +++ b/scripts/push-to-ecr.sh @@ -7,6 +7,9 @@ set -o errexit # exit on first error set -o nounset # exit on using unset variables set -o pipefail # exit on any error in a pipeline +# Change to the directory where the script is located +cd "$(dirname "$0")" + # Prompt user for inputs echo "================================================" echo "Bedrock Access Gateway - Build and Push to ECR"