Add Docker support for Gateway and SDK documentation
- Add Dockerfile and build script for Gateway containerization - Add USAGE.md documenting SDK usage for Client/Agent implementations - Move socket.io-client to production dependencies (required by SDK) - Remove redundant timestamp field from RoutedMessage (UUID v7 contains timestamp) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
279d94b69d
commit
2ea7938444
8 changed files with 724 additions and 8 deletions
33
src/gateway/scripts/build-and-push.sh
Executable file
33
src/gateway/scripts/build-and-push.sh
Executable file
|
|
@ -0,0 +1,33 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
GATEWAY_DIR="$(dirname "$SCRIPT_DIR")"
|
||||
PROJECT_ROOT="$(cd "$GATEWAY_DIR/../.." && pwd)"
|
||||
|
||||
REPO="085931705009.dkr.ecr.us-west-2.amazonaws.com/super-multica/gateway"
|
||||
BRANCH="$(git symbolic-ref --short -q HEAD | tr '/' '-')"
|
||||
IMAGE_TAG="$(date +%F_%H-%M-%S)-${BRANCH}-$(git rev-parse --short HEAD)"
|
||||
IMAGE="$REPO:$IMAGE_TAG"
|
||||
|
||||
# Determine if sudo is needed for docker commands
|
||||
if [[ "$(uname -s)" == "Linux" ]]; then
|
||||
DOCKER_CMD="sudo docker"
|
||||
else
|
||||
DOCKER_CMD="docker"
|
||||
fi
|
||||
|
||||
echo "Building image: $IMAGE"
|
||||
echo "Using Dockerfile: $GATEWAY_DIR/Dockerfile"
|
||||
echo "Build context: $PROJECT_ROOT"
|
||||
|
||||
# Login to ECR
|
||||
aws ecr get-login-password --region us-west-2 | $DOCKER_CMD login --username AWS --password-stdin 085931705009.dkr.ecr.us-west-2.amazonaws.com
|
||||
|
||||
# Build from project root with gateway Dockerfile
|
||||
$DOCKER_CMD build -f "$GATEWAY_DIR/Dockerfile" -t "$IMAGE" "$PROJECT_ROOT"
|
||||
$DOCKER_CMD push "$IMAGE"
|
||||
|
||||
echo ""
|
||||
echo "Successfully pushed: $IMAGE"
|
||||
Loading…
Add table
Add a link
Reference in a new issue