From d38b313c8b246a72a96c9fbd01f11b156d1dd1ad Mon Sep 17 00:00:00 2001 From: abdulhade Date: Fri, 4 Apr 2025 20:36:10 +0300 Subject: [PATCH] Added configurations part. --- README.md | 123 +++++++++++++++++++++++++++++------------------------- 1 file changed, 67 insertions(+), 56 deletions(-) diff --git a/README.md b/README.md index 7a0a310..0077c1d 100644 --- a/README.md +++ b/README.md @@ -1,116 +1,127 @@ # Capital Index Database Middleware -## Description: +## Overview -### About this project: +### About This Project +The **Capital Index Database Middleware** provides an abstraction layer for your database, enhancing query management and change monitoring. It streamlines database interactions while ensuring efficient performance and security. -Database Middleware that handles database's querying and changes monitoring. +### Repository Contents +This repository includes: +- **Middleware Source Code** – The core logic for database interaction. +- **Dockerfile** – Configuration for containerized deployment. +- **Install & Management Scripts** – Scripts for streamlined installation and maintenance. -Adds an abstraction layer on top of your Database. -### This repo contains: -1. Middleware Source Code -2. Dockerfile -3. Install & Manage Scripts +## Getting Started -## Getting Started: +### Installation -### Installation: - -#### 1. Install the required dependencies: - -Needed to download and build the docker container. +#### Step 1: Install Required Dependencies +Before installing, ensure you have the necessary dependencies to download and build the Docker container.
Debian/Ubuntu ```bash -sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get install wget git docker.io -y +sudo apt-get update && sudo apt-get upgrade -y +sudo apt-get install -y wget git docker.io ``` -[Optional] Install Docker build-kit: - +[Optional] Install Docker BuildKit: ```bash -sudo apt-get install docker-buildx -y +sudo apt-get install -y docker-buildx ``` -
+CentOS/Fedora - CentOS/Fedora - -- Note: CentOS 7 uses yum instead of dnf. Replace dnf with yum if on CentOS 7. +> **Note:** If using CentOS 7, replace `dnf` with `yum`. ```bash -sudo dnf update -y -sudo dnf upgrade -y +sudo dnf update -y && sudo dnf upgrade -y sudo dnf install -y wget git docker ``` -[Optional] Install Docker build-kit: - +[Optional] Install Docker BuildKit: ```bash sudo dnf install -y docker-buildx ``` -
-Arch Linux: +Arch Linux ```bash -sudo pacman -Syu --noconfirm && sudo pacman -S --noconfirm wget git docker +sudo pacman -Syu --noconfirm +sudo pacman -S --noconfirm wget git docker ``` -[Optional] Install Docker build-kit: - +[Optional] Install Docker BuildKit: ```bash sudo pacman -S --noconfirm docker-buildx ``` -
-Alpine Linux: +Alpine Linux ```bash -sudo apk update -sudo apk upgrade +sudo apk update && sudo apk upgrade sudo apk add --no-cache wget git docker ``` -[Optional] Install Docker build-kit: - +[Optional] Install Docker BuildKit: ```bash sudo apk add --no-cache docker-cli-buildx ``` -
-#### 2. Run the setup script: +#### Step 2: Run the Setup Script +After installing dependencies, configure Docker permissions and run the setup script: -Add your user to the docker group and login again: +1. Add your user to the Docker group and re-login: + ```bash + sudo usermod -aG docker $USER && sudo su - $USER + ``` -```bash -sudo usermod -aG docker $USER && sudo su - $USER -``` +2. Download and execute the `setup.sh` script: + ```bash + mkdir -p ~/.db-middleware/scripts \ + && rm -rf ~/.db-middleware/scripts/* \ + && cd ~/.db-middleware/scripts \ + && wget -qO setup.sh https://gitea.abdulhade.com/abdulhade/db-middleware/raw/branch/main/scripts/setup.sh \ + && bash setup.sh + ``` -This will download & execute the `setup.sh` script. +--- -```bash -mkdir -p ~/.db-middleware/scripts && -rm -rf ~/.db-middleware/scripts/* && -cd ~/.db-middleware/scripts && -wget -qO setup.sh https://gitea.abdulhade.com/abdulhade/db-middleware/raw/branch/main/scripts/setup.sh && -bash setup.sh -``` +## Configuration +During installation, you will be prompted to configure the following variables: -