Skip to content

Commit 45a6918

Browse files
committed
k
1 parent 22740f0 commit 45a6918

File tree

1 file changed

+33
-10
lines changed

1 file changed

+33
-10
lines changed

deployment/docker_compose/install.sh

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ NC='\033[0m' # No Color
5050

5151
# Step counter variables
5252
CURRENT_STEP=0
53-
TOTAL_STEPS=10
53+
TOTAL_STEPS=8
5454

5555
# Print colored output
5656
print_success() {
@@ -300,12 +300,28 @@ fi
300300

301301
# Create directory structure
302302
print_step "Creating directory structure"
303-
mkdir -p onyx_data/deployment
304-
mkdir -p onyx_data/data/nginx/local
305-
print_success "Directory structure created"
303+
if [ -d "onyx_data" ]; then
304+
print_info "Directory structure already exists"
305+
print_success "Using existing onyx_data directory"
306+
else
307+
mkdir -p onyx_data/deployment
308+
mkdir -p onyx_data/data/nginx/local
309+
print_success "Directory structure created"
310+
fi
311+
312+
# Download all required files
313+
print_step "Downloading Onyx configuration files"
314+
print_info "This step downloads all necessary configuration files from GitHub..."
315+
echo ""
316+
print_info "Downloading the following files:"
317+
echo " • docker-compose.yml - Main Docker Compose configuration"
318+
echo " • env.template - Environment variables template"
319+
echo " • nginx/app.conf.template - Nginx web server configuration"
320+
echo " • nginx/run-nginx.sh - Nginx startup script"
321+
echo " • README.md - Documentation and setup instructions"
322+
echo ""
306323

307324
# Download Docker Compose file
308-
print_step "Downloading Docker Compose configuration"
309325
COMPOSE_FILE="onyx_data/deployment/docker-compose.yml"
310326
print_info "Downloading docker-compose.yml..."
311327
if curl -fsSL -o "$COMPOSE_FILE" "${GITHUB_RAW_URL}/docker-compose.yml" 2>/dev/null; then
@@ -317,7 +333,6 @@ else
317333
fi
318334

319335
# Download env.template file
320-
print_step "Downloading environment template"
321336
ENV_TEMPLATE="onyx_data/deployment/env.template"
322337
print_info "Downloading env.template..."
323338
if curl -fsSL -o "$ENV_TEMPLATE" "${GITHUB_RAW_URL}/env.template" 2>/dev/null; then
@@ -329,9 +344,6 @@ else
329344
fi
330345

331346
# Download nginx config files
332-
print_step "Setting up nginx configuration"
333-
334-
# Base URL for nginx files
335347
NGINX_BASE_URL="https://raw.githubusercontent.com/onyx-dot-app/onyx/docker-compose-easy/deployment/data/nginx"
336348

337349
# Download app.conf.template
@@ -357,9 +369,20 @@ else
357369
exit 1
358370
fi
359371

372+
# Download README file
373+
README_FILE="onyx_data/README.md"
374+
print_info "Downloading README.md..."
375+
if curl -fsSL -o "$README_FILE" "${GITHUB_RAW_URL}/README.md" 2>/dev/null; then
376+
print_success "README.md downloaded successfully"
377+
else
378+
print_error "Failed to download README.md"
379+
print_info "Please ensure you have internet connection and try again"
380+
exit 1
381+
fi
382+
360383
# Create empty local directory marker (if needed)
361384
touch "onyx_data/data/nginx/local/.gitkeep"
362-
print_success "Nginx configuration setup complete"
385+
print_success "All configuration files downloaded successfully"
363386

364387
# Create .env file from template
365388
print_step "Setting up environment configuration"

0 commit comments

Comments
 (0)