#!/bin/sh

create_volume() {
    docker volume inspect $1 > /dev/null 2>&1
    if [ $? -eq 0 ]; then
        echo "Volume '$1' already exists."
    else
        docker volume create --name=$1
        echo "Volume '$1' created."
    fi
}

create_volume dbkeydata
create_volume dbhome

docker build -t docker_db

docker-compose up -d --build
