Skip to content

PsiSrova/ResilientRetail-Dynamo-implemented

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setup Instructions

Follow these steps to set up the project and run the code on your local machine.


Prerequisites

Ensure the following are installed:

  • Python 3.7 or later
  • PostgreSQL
  • pip (Python package manager)

Also, you need to ensure that you have a server.log file inside logs/ directory.

Step 1: Install PostgreSQL

For Ubuntu/Linux

sudo apt update
sudo apt install postgresql postgresql-contrib

For macOS

brew install postgresql

For Windows

  1. Download PostgreSQL from the official website.
  2. Run the installer and follow the setup wizard.

Start PostgreSQL Service

sudo service postgresql start

Set Up PostgreSQL User and Database

  1. Open the PostgreSQL shell:
    sudo -u postgres psql
  2. Run the following commands:
    CREATE USER myuser WITH PASSWORD 'mypassword';
    CREATE DATABASE mydatabase;
    GRANT ALL PRIVILEGES ON DATABASE mydatabase TO myuser;
  3. Exit the PostgreSQL shell:
    \q

Step 2: Clone the Project

git clone https://github.com/your-repository/serverinfo-sorting.git
cd serverinfo-sorting

Step 3: Install Required Python Modules

Install all required libraries using pip:

pip install sortedcontainers psycopg2-binary loguru

Step 4: Update Configuration

Update the PostgreSQL connection settings in the script:

DB_HOST = "localhost"
DB_PORT = "5432"
DB_NAME = "mydatabase"
DB_USER = "myuser"
DB_PASSWORD = "mypassword"

Step 5: Run the Script

Execute the script to verify functionality:

./run.sh

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published