From ca9f40667bee85e75ff0f039533a8d2625832be1 Mon Sep 17 00:00:00 2001 From: dimti Date: Sat, 4 Feb 2023 17:47:02 +0300 Subject: [PATCH] * use full path to docker_cmd config script in bash helpers --- README.md | 8 ++++++++ bash/enter-to-workspace.sh | 4 +++- bash/mysql.sh | 4 +++- bash/restart-nginx.sh | 4 +++- bash/root-onto-workspace.sh | 4 +++- bash/update-composer.sh | 4 +++- docker-compose.elastic.yml.example | 16 ++++------------ 7 files changed, 27 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 39222ae..cba83f8 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,14 @@ For restart `nginx` after some changes in nginx configuration, you might: `./restart-nginx.sh` +### Elastic + +Copy example + +Launch: + +`dc -f docker-compose.elastic.yml up -d elastic` + ## Src build need DOCKER_BUILDKIT If you want build own workspace image. You need export environment variable diff --git a/bash/enter-to-workspace.sh b/bash/enter-to-workspace.sh index 311d1e5..c567edf 100755 --- a/bash/enter-to-workspace.sh +++ b/bash/enter-to-workspace.sh @@ -1,5 +1,7 @@ #!/bin/bash -. ./_docker-cmd.sh || { +DIR="$(realpath $(dirname "$(readlink -f "$0")")/..)" + +. $DIR/bash/_docker-cmd.sh || { echo "no docker cmd is presented" && exit 1 } diff --git a/bash/mysql.sh b/bash/mysql.sh index 2e2fc01..6ebc78a 100755 --- a/bash/mysql.sh +++ b/bash/mysql.sh @@ -1,5 +1,7 @@ #!/bin/bash -. ./_docker-cmd.sh || { +DIR="$(realpath $(dirname "$(readlink -f "$0")")/..)" + +. $DIR/bash/_docker-cmd.sh || { echo "no docker cmd is presented" && exit 1 } diff --git a/bash/restart-nginx.sh b/bash/restart-nginx.sh index 4dd5866..c5fedec 100755 --- a/bash/restart-nginx.sh +++ b/bash/restart-nginx.sh @@ -1,5 +1,7 @@ #!/bin/bash -. ./_docker-cmd.sh || { +DIR="$(realpath $(dirname "$(readlink -f "$0")")/..)" + +. $DIR/bash/_docker-cmd.sh || { echo "no docker cmd is presented" && exit 1 } diff --git a/bash/root-onto-workspace.sh b/bash/root-onto-workspace.sh index 4d91dc8..b48cffa 100644 --- a/bash/root-onto-workspace.sh +++ b/bash/root-onto-workspace.sh @@ -1,5 +1,7 @@ #!/bin/bash -. ./_docker-cmd.sh || { +DIR="$(realpath $(dirname "$(readlink -f "$0")")/..)" + +. $DIR/bash/_docker-cmd.sh || { echo "no docker cmd is presented" && exit 1 } diff --git a/bash/update-composer.sh b/bash/update-composer.sh index 0938210..20a9e5f 100755 --- a/bash/update-composer.sh +++ b/bash/update-composer.sh @@ -1,5 +1,7 @@ #!/bin/bash -. ./_docker-cmd.sh || { +DIR="$(realpath $(dirname "$(readlink -f "$0")")/..)" + +. $DIR/bash/_docker-cmd.sh || { echo "no docker cmd is presented" && exit 1 } diff --git a/docker-compose.elastic.yml.example b/docker-compose.elastic.yml.example index 9d978ff..10e9ae3 100755 --- a/docker-compose.elastic.yml.example +++ b/docker-compose.elastic.yml.example @@ -1,23 +1,15 @@ version: '3.6' services: - elastic732: - extends: - file: docker-compose.elastic.base.yml - service: elastic - build: - dockerfile: elastic732.Dockerfile - volumes: - - elastic732:/usr/share/elastic/data - elastic752: + elastic: extends: file: docker-compose.elastic.base.yml service: elastic + restart: always build: dockerfile: elastic752.Dockerfile volumes: - - elastic752:/usr/share/elastic/data + - elastic:/usr/share/elastic/data volumes: - elastic732: - elastic752: + elastic: