diff --git a/scripts/deploy_image.sh b/scripts/deploy_image.sh index 7949597..d430157 100644 --- a/scripts/deploy_image.sh +++ b/scripts/deploy_image.sh @@ -4,7 +4,7 @@ set -euo pipefail ENV=${1:-test} IMAGE=${2:-marketingsystemdatatool_msdt:latest} CMD=${3:-up} -PLATFORM=${PLATFORM:-linux/amd64} +PLATFORM=${PLATFORM:-} ROOT_DIR=$(cd "$(dirname "$0")/.." && pwd) @@ -17,8 +17,9 @@ fi case "$CMD" in up) docker rm -f msdt >/dev/null 2>&1 || true - docker run -d --name msdt \ - --platform "$PLATFORM" \ + PLATFORM_FLAG="" + if [ -n "$PLATFORM" ]; then PLATFORM_FLAG="--platform $PLATFORM"; fi + docker run -d --name msdt $PLATFORM_FLAG \ -p 8077:8077 \ -e APP_ENV="$ENV" \ -e MARKETING_DB_HOST="${MARKETING_DB_HOST:-}" \ @@ -41,5 +42,6 @@ case "$CMD" in docker logs -f msdt ;; *) echo "usage: deploy_image.sh [up|down|restart|logs]" >&2 + echo "env overrides: set PLATFORM=linux/amd64 or PLATFORM=linux/arm64 if needed" >&2 exit 1 ;; esac