From 1771877fe851158e6c6d787d9db3199be5063c66 Mon Sep 17 00:00:00 2001 From: dimti Date: Thu, 6 Jul 2023 17:37:47 +0300 Subject: [PATCH] + mariadb bash helper script launch mariadb client + redis ui`s in separate docker compose config --- bash/db-restart.sh | 15 +++++++++++++++ bash/mariadb.sh | 15 +++++++++++++++ docker-compose.redis.yml | 29 +++++++++++++++++++++++++++++ 3 files changed, 59 insertions(+) create mode 100755 bash/db-restart.sh create mode 100755 bash/mariadb.sh create mode 100755 docker-compose.redis.yml diff --git a/bash/db-restart.sh b/bash/db-restart.sh new file mode 100755 index 0000000..3b08697 --- /dev/null +++ b/bash/db-restart.sh @@ -0,0 +1,15 @@ +#!/bin/bash +DIR="$(realpath $(dirname "$(readlink -f "$0")")/..)" + +. $DIR/bash/_docker-cmd.sh || { + echo "no docker cmd is presented" && exit 1 +} + +CONTAINER=$(docker ps | grep db | awk '{print $1}') + +if [[ -z "${CONTAINER}" ]]; then + echo "Unable to find container: db" + exit 1 +fi + +$DOCKER_CMD restart ${CONTAINER} \ No newline at end of file diff --git a/bash/mariadb.sh b/bash/mariadb.sh new file mode 100755 index 0000000..b5852e1 --- /dev/null +++ b/bash/mariadb.sh @@ -0,0 +1,15 @@ +#!/bin/bash +DIR="$(realpath $(dirname "$(readlink -f "$0")")/..)" + +. $DIR/bash/_docker-cmd.sh || { + echo "no docker cmd is presented" && exit 1 +} + +CONTAINER=$(docker ps | grep mariadb | awk '{print $1}') + +if [[ -z "${CONTAINER}" ]]; then + echo "Unable to find container: db" + exit 1 +fi + +$DOCKER_CMD exec -ti ${CONTAINER} bash -c 'LANG=ru_RU.UTF-8 mariadb -u root -p123456' diff --git a/docker-compose.redis.yml b/docker-compose.redis.yml new file mode 100755 index 0000000..ad6bee9 --- /dev/null +++ b/docker-compose.redis.yml @@ -0,0 +1,29 @@ +version: '3.6' + +services: + redis-ui: + image: marian/rebrow + restart: always + ports: + - "5001:5001" + links: + - redis-example:redis-example + redis-stack: + image: redis/redis-stack:latest + restart: always + ports: + - "8001:8001" + expose: + - 6379 + redis-commander: + container_name: redis-commander + hostname: redis-commander + image: ghcr.io/joeferner/redis-commander:latest + restart: always + environment: + - REDIS_HOSTS=intai:redis-intai:6379 + ports: + - "8081:8081" + +volumes: + elastic: