From bf70fba5163b218e3621b76c4e2811d8b04845a3 Mon Sep 17 00:00:00 2001 From: Alphaeus Mote Date: Thu, 23 Oct 2025 16:40:43 -0400 Subject: [PATCH] Fix Docker Compose version warning and improve script permissions DOCKER COMPOSE: - Removed obsolete 'version' attribute from docker-compose.yml - Keeps db-ui image as ghcr.io/n7olkachev/db-ui:latest SCRIPT PERMISSIONS: - Updated README.md with recursive chmod command: find . -name '*.sh' -exec chmod +x {} \; - Updated QUICKSTART.md with Step 0: Make Scripts Executable - Removed individual chmod commands from each step - Single command makes all .sh files executable at once DOCUMENTATION: - Renumbered steps in QUICKSTART.md for clarity - Step 0: Make Scripts Executable - Step 1: Install Dependencies (Optional) - Step 2: Start Docker Containers - Step 3: Initialize Database Schema - Step 4: Generate Test Data This resolves the Docker Compose warning and simplifies the setup process with a single chmod command. --- README.md | 17 ++++++++++------- docker-compose.yml | 2 -- docs/QUICKSTART.md | 24 +++++++++++------------- 3 files changed, 21 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 14e4bb6..8b40838 100644 --- a/README.md +++ b/README.md @@ -108,14 +108,19 @@ git clone https://github.com/freedbygrace/SQL.git cd SQL ``` -### 2. Install Dependencies (Optional) +### 2. Make Scripts Executable +```bash +# Make all .sh files executable recursively +find . -name "*.sh" -exec chmod +x {} \; +``` + +### 3. Install Dependencies (Optional) ```bash # Only if you don't have Docker, psql, etc. -chmod +x scripts/install-dependencies.sh ./scripts/install-dependencies.sh ``` -### 3. Start the Database +### 4. Start the Database ```bash docker-compose up -d ``` @@ -124,17 +129,15 @@ This starts: - **PostgreSQL 16** on port `5432` - **DB-UI** web interface on port `3000` -### 4. Initialize the Schema +### 5. Initialize the Schema ```bash -chmod +x scripts/setup-database.sh ./scripts/setup-database.sh ``` **Note:** The script will automatically check for required dependencies and prompt you to install them if missing. -### 5. Generate Test Data +### 6. Generate Test Data ```bash -chmod +x data/generate_data.sh ./data/generate_data.sh ``` diff --git a/docker-compose.yml b/docker-compose.yml index 368a905..b91bab9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,3 @@ -version: '3.8' - services: postgres: image: postgres:16-alpine diff --git a/docs/QUICKSTART.md b/docs/QUICKSTART.md index 0a0bd55..2072ff3 100644 --- a/docs/QUICKSTART.md +++ b/docs/QUICKSTART.md @@ -2,14 +2,18 @@ ## 🚀 Get Up and Running in 5 Minutes -### Step 0: Install Dependencies (Optional - 5 minutes) +### Step 0: Make Scripts Executable + +```bash +# Make all .sh files executable recursively +find . -name "*.sh" -exec chmod +x {} \; +``` + +### Step 1: Install Dependencies (Optional - 5 minutes) **If you don't have Docker, PostgreSQL client (psql), or other required tools:** ```bash -# Make script executable -chmod +x scripts/install-dependencies.sh - # Run the installer ./scripts/install-dependencies.sh ``` @@ -25,7 +29,7 @@ chmod +x scripts/install-dependencies.sh --- -### Step 1: Start Docker Containers (1 minute) +### Step 2: Start Docker Containers (1 minute) ```bash # From the project root directory @@ -46,12 +50,9 @@ You should see both `business_analytics_db` and `business_analytics_ui` running. --- -### Step 2: Initialize Database Schema (1 minute) +### Step 3: Initialize Database Schema (1 minute) ```bash -# Make script executable (first time only) -chmod +x scripts/setup-database.sh - # Run setup ./scripts/setup-database.sh ``` @@ -71,12 +72,9 @@ chmod +x scripts/setup-database.sh --- -### Step 3: Generate Test Data (15-30 minutes) +### Step 4: Generate Test Data (15-30 minutes) ```bash -# Make script executable (first time only) -chmod +x data/generate_data.sh - # Run data generation ./data/generate_data.sh ```