Browse Source

+ mariadb bash helper script launch mariadb client

+ redis ui`s in separate docker compose config
master
dimti 1 year ago
parent
commit
1771877fe8
  1. 15
      bash/db-restart.sh
  2. 15
      bash/mariadb.sh
  3. 29
      docker-compose.redis.yml

15
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}

15
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'

29
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:
Loading…
Cancel
Save