Skip to content

Commit 37374e7

Browse files
authored
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
1 parent b3c1c82 commit 37374e7

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

docker-compose.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
version: '3.8'
2+
3+
services:
4+
bedrock-access-gateway:
5+
build:
6+
context: ./src
7+
dockerfile: Dockerfile_ecs
8+
ports:
9+
- "127.0.0.1:8000:8080"
10+
environment:
11+
- ENABLE_PROMPT_CACHING=true
12+
- API_KEY=${OPENAI_API_KEY}
13+
- AWS_PROFILE
14+
- AWS_ACCESS_KEY_ID
15+
- AWS_SECRET_ACCESS_KEY
16+
- AWS_SESSION_TOKEN
17+
volumes:
18+
- ${HOME}/.aws:/home/appuser/.aws

scripts/push-to-ecr.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ set -o errexit # exit on first error
77
set -o nounset # exit on using unset variables
88
set -o pipefail # exit on any error in a pipeline
99

10+
# Change to the directory where the script is located
11+
cd "$(dirname "$0")"
12+
1013
# Prompt user for inputs
1114
echo "================================================"
1215
echo "Bedrock Access Gateway - Build and Push to ECR"

0 commit comments

Comments
 (0)