Skip to main content

Bootstrap Scripts

One-command deployment system

The bootstrap script handles everything from dependency installation to service deployment with a single command.

Main Script

bootstrap.sh

Purpose: One-command setup for entire system

./bootstrap.sh
# Follow prompts to configure and deploy

What it does:

  1. Detects your operating system
  2. Installs Docker and dependencies
  3. Clones/sets up project
  4. Configures environment
  5. Deploys all services
  6. Runs health checks

Script Components

Core Scripts

ScriptPurposeWhen Used
detect_os.shOS detectionAutomatic
install_deps.shInstall Docker, GitAutomatic
configure_env.shCreate .env fileAutomatic
deploy_services.shStart Docker servicesAutomatic

Utility Scripts

ScriptPurposeUsage
health_check.shCheck service statusManual
generate_wallet.shCreate Sei walletManual
troubleshoot.shDiagnose problemsManual

Configuration Profiles

  • No prompts, uses all defaults
  • Fastest setup
  • Good for most users

local-dev

  • Lightweight development setup
  • Few prompts for basic options

remote

  • Production setup with domain
  • SSL certificates via Traefik

custom

  • Full interactive configuration
  • Choose all options manually

Usage Examples

Quick Setup

# Automatic setup with defaults
./bootstrap.sh
# Select "default" when prompted

Custom Setup

# Interactive configuration
./bootstrap.sh
# Select "custom" for full control

Health Monitoring

# Quick health check
bash scripts/bootstrap/health_check.sh quick

# Full health check
bash scripts/bootstrap/health_check.sh full

Troubleshooting

# Diagnose issues
bash scripts/bootstrap/troubleshoot.sh

# Generate new wallet
bash scripts/bootstrap/generate_wallet.sh

Environment Configuration

Automatic Generation

The bootstrap script creates .env file automatically based on:

  • Selected profile
  • User inputs (API keys, domain)
  • System detection (OS, available ports)

Profile Comparison

Settingdefaultlocal-devremotecustom
PromptsNoneFewSomeAll
DomainlocalhostlocalhostRequiredChoice
SSLNoNoYesChoice
OllamaNoNoOptionalChoice

Script Features

Error Handling

  • Fails fast on errors
  • Clear error messages
  • Recovery suggestions
  • Automatic retries

Cross-Platform

  • Linux: Native support
  • macOS: Full compatibility
  • Windows: WSL recommended
  • WSL: Optimized experience

Non-Interactive Mode

# Automated deployment (CI/CD)
curl -sSL https://raw.githubusercontent.com/nicoware-dev/seiling-buidlbox/main/bootstrap.sh | bash -s -- -auto

Common Issues

Permission Errors

# Make executable
chmod +x bootstrap.sh
chmod +x scripts/bootstrap/*.sh

Docker Issues

# Start Docker daemon
sudo systemctl start docker # Linux
# Or restart Docker Desktop # Windows/Mac

Network Issues

# Check connectivity
curl -I https://github.com
ping google.com

Resource Issues

# Check available resources
free -h # RAM
df -h # Disk space

Advanced Usage

Environment Override

# Set custom variables before running
export OPENAI_API_KEY=your_key
export SEI_PRIVATE_KEY=0xyour_key
./bootstrap.sh

Partial Deployment

# Skip dependency installation
export SKIP_DEPS=true
./bootstrap.sh

Debug Mode

# Verbose output
bash -x bootstrap.sh

Manual Operations

Reset System

# Complete reset
docker compose down -v
rm .env
./bootstrap.sh

Update Services

# Update Docker images
docker compose pull
docker compose up -d

Service Management

# Individual service control
docker restart seiling-<service>
docker logs seiling-<service>

The bootstrap script is designed to be foolproof. Just run it and everything works automatically.