@@ -50,7 +50,7 @@ NC='\033[0m' # No Color
50
50
51
51
# Step counter variables
52
52
CURRENT_STEP=0
53
- TOTAL_STEPS=10
53
+ TOTAL_STEPS=8
54
54
55
55
# Print colored output
56
56
print_success () {
300
300
301
301
# Create directory structure
302
302
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 " "
306
323
307
324
# Download Docker Compose file
308
- print_step " Downloading Docker Compose configuration"
309
325
COMPOSE_FILE=" onyx_data/deployment/docker-compose.yml"
310
326
print_info " Downloading docker-compose.yml..."
311
327
if curl -fsSL -o " $COMPOSE_FILE " " ${GITHUB_RAW_URL} /docker-compose.yml" 2> /dev/null; then
317
333
fi
318
334
319
335
# Download env.template file
320
- print_step " Downloading environment template"
321
336
ENV_TEMPLATE=" onyx_data/deployment/env.template"
322
337
print_info " Downloading env.template..."
323
338
if curl -fsSL -o " $ENV_TEMPLATE " " ${GITHUB_RAW_URL} /env.template" 2> /dev/null; then
329
344
fi
330
345
331
346
# Download nginx config files
332
- print_step " Setting up nginx configuration"
333
-
334
- # Base URL for nginx files
335
347
NGINX_BASE_URL=" https://raw.githubusercontent.com/onyx-dot-app/onyx/docker-compose-easy/deployment/data/nginx"
336
348
337
349
# Download app.conf.template
@@ -357,9 +369,20 @@ else
357
369
exit 1
358
370
fi
359
371
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
+
360
383
# Create empty local directory marker (if needed)
361
384
touch " onyx_data/data/nginx/local/.gitkeep"
362
- print_success " Nginx configuration setup complete "
385
+ print_success " All configuration files downloaded successfully "
363
386
364
387
# Create .env file from template
365
388
print_step " Setting up environment configuration"
0 commit comments