Add local instaswap E2E workspace harness
This commit is contained in:
23
local-compose.sh
Executable file
23
local-compose.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
ENV_FILE="${ROOT_DIR}/.env.local"
|
||||
|
||||
if [[ ! -f "${ENV_FILE}" ]]; then
|
||||
if [[ -f "${ROOT_DIR}/.env.local.example" ]]; then
|
||||
cp "${ROOT_DIR}/.env.local.example" "${ENV_FILE}"
|
||||
echo "Created ${ENV_FILE} from .env.local.example" >&2
|
||||
else
|
||||
echo "Missing ${ENV_FILE} and .env.local.example" >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
exec env \
|
||||
LOCAL_UID="$(id -u)" \
|
||||
LOCAL_GID="$(id -g)" \
|
||||
docker compose \
|
||||
--env-file "${ENV_FILE}" \
|
||||
-f "${ROOT_DIR}/docker-compose.local.yml" \
|
||||
"$@"
|
||||
Reference in New Issue
Block a user