fix: update storage directory variable in run.sh for consistency

This commit is contained in:
2026-02-28 11:15:21 +01:00
parent aa9274aca3
commit 050986ff87
2 changed files with 56 additions and 4 deletions

5
run.sh
View File

@@ -1,5 +1,6 @@
#!/usr/bin/env bash
AZURITE_DIR="${AZURITE_DIR:-./storage}"
CONTAINER_ARGS=()
while [[ $# -gt 0 ]]; do
@@ -17,9 +18,9 @@ while [[ $# -gt 0 ]]; do
done
if command -v dockerd &> /dev/null; then
docker run --rm -it --name azurite --env-file accounts.env -p 443:443 -v ./storage:/storage azurite:latest "${CONTAINER_ARGS[@]}"
docker run --rm -it --name azurite --env-file accounts.env -p 443:443 -v "$AZURITE_DIR":/storage azurite:latest "${CONTAINER_ARGS[@]}"
elif command -v container &> /dev/null; then
container run --rm -it --name azurite --env-file accounts.env -p 443:443 --mount type=bind,source=./storage,target=/storage azurite:latest "${CONTAINER_ARGS[@]}"
container run --rm -it --name azurite --env-file accounts.env -p 443:443 --mount type=bind,source="$AZURITE_DIR",target=/storage azurite:latest "${CONTAINER_ARGS[@]}"
else
echo "Neither supported container runtime found." >&2
exit 1