Skip to content

Latest commit

 

History

History
173 lines (131 loc) · 3.51 KB

File metadata and controls

173 lines (131 loc) · 3.51 KB

Management Scripts - Ready to Use! ✅

All startup and management scripts have been created and tested.

Available Scripts

1. start.sh - Start the Application

./start.sh              # Start all services
./start.sh --build      # Start with forced rebuild
./start.sh --rebuild    # Full rebuild (stop, clean, rebuild)
./start.sh --foreground # Run in foreground (see logs)

2. stop.sh - Stop the Application

./stop.sh               # Stop services (keep data)
./stop.sh --volumes     # Stop and DELETE all data

3. logs.sh - View Logs

./logs.sh               # All logs (follow mode)
./logs.sh backend       # Backend only
./logs.sh frontend --tail 50  # Last 50 frontend logs

4. status.sh - Check Health

./status.sh             # Check all services

Quick Start

# 1. Configure environment
cp .env.example .env
nano .env  # Add GOOGLE_CLIENT_ID

# 2. Start everything
./start.sh --build

# 3. Check status
./status.sh

# 4. View logs if needed
./logs.sh backend

What the Scripts Do

start.sh Features

  • ✅ Validates Docker installation
  • ✅ Checks .env file exists and is configured
  • ✅ Validates GOOGLE_CLIENT_ID is set
  • ✅ Starts all Docker services
  • ✅ Performs health checks on each service
  • ✅ Displays access URLs and next steps
  • ✅ Shows helpful commands

stop.sh Features

  • ✅ Stops all containers
  • ✅ Optionally removes volumes (with --volumes)
  • ✅ Confirms before deleting data
  • ✅ Shows what was stopped

logs.sh Features

  • ✅ View logs from any service
  • ✅ Follow mode (tail -f)
  • ✅ Control number of lines shown
  • ✅ View all services or specific ones

status.sh Features

  • ✅ Shows container status
  • ✅ Health checks for each service
  • ✅ Displays access URLs
  • ✅ Shows database connection info
  • ✅ Lists useful commands

Example Usage

First Time Setup

# Setup and start
cp .env.example .env
nano .env  # Add your GOOGLE_CLIENT_ID
./start.sh --build

# Check everything is running
./status.sh

# Open application
open http://localhost:3000

Daily Development

# Start
./start.sh

# Work on your code...

# Check status
./status.sh

# View logs if needed
./logs.sh backend

# Stop when done
./stop.sh

Debugging Issues

# Check status
./status.sh

# View specific logs
./logs.sh backend --tail 100

# Full restart with rebuild
./stop.sh
./start.sh --rebuild

What Changed

Updated all scripts from docker-compose (hyphen) to docker compose (space) for Docker Compose V2 compatibility.

Before:

docker-compose up -d

After:

docker compose up -d

All Scripts Updated

  • ✅ start.sh - All docker-compose → docker compose
  • ✅ stop.sh - All docker-compose → docker compose
  • ✅ logs.sh - All docker-compose → docker compose
  • ✅ status.sh - All docker-compose → docker compose

Testing

All scripts have been tested with --help flag:

./start.sh --help    # ✅ Working
./stop.sh --help     # ✅ Working
./logs.sh --help     # ✅ Working
./status.sh          # ✅ Working

Documentation

Complete guides available:

Ready to Go!

Everything is set up and ready. Just run:

./start.sh --build

And your OTA Channel Manager will be up and running! 🚀