From e32694b0d0dfe82af75ff49612e1f14a3525c83a Mon Sep 17 00:00:00 2001 From: Costa Alexoglou Date: Wed, 15 Oct 2025 12:33:47 +0200 Subject: [PATCH] chore: execute devenv from any directory (#112406) --- devenv/create_docker_compose.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/devenv/create_docker_compose.sh b/devenv/create_docker_compose.sh index 2acdd0836a1..5d1d2a90bb4 100755 --- a/devenv/create_docker_compose.sh +++ b/devenv/create_docker_compose.sh @@ -2,15 +2,18 @@ shopt -s nullglob # Enable nullglob -blocks_dir=docker/blocks -docker_dir=docker -template_dir=templates +# Get the directory where this script is located (works from any execution directory) +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + +blocks_dir="${SCRIPT_DIR}/docker/blocks" +docker_dir="${SCRIPT_DIR}/docker" +template_dir="${SCRIPT_DIR}/templates" grafana_config_file=conf.tmp grafana_config=config -compose_header_file=docker/compose_header.yml -compose_volume_section_file=docker/compose_volume_section.yml +compose_header_file="${SCRIPT_DIR}/docker/compose_header.yml" +compose_volume_section_file="${SCRIPT_DIR}/docker/compose_volume_section.yml" compose_volume_section_create_flag=docker_volume_create_true compose_file=docker-compose.yaml env_file=.env