Install Script
The install.sh script automates the full deployment process on a fresh Linux server.
What it does
The script supports two installation modes:
Option A: Docker Installation
- Dependency Verification: Confirms
dockeris installed. - Repository Cloning: Clones the backend and frontend repositories if they do not already exist in the current folder.
- Secret Generation: Automatically generates a secure value for
AUTH_SECRETin.envif not already set. - Database Configuration:
- Self-hosted Database: Prompts for a PostgreSQL password, automatically generates a
docker-compose.ymlwith PostgreSQL and pgvector, and sets up a database container. - External Database: Prompts for an external database URL, and generates a
docker-compose.ymlwithout a database container.
- Self-hosted Database: Prompts for a PostgreSQL password, automatically generates a
- Container Orchestration: Builds the Docker containers when running
setup.
Option B: Direct Installation (Bare-metal)
- Dependency Verification: Confirms
python3,uv,node, andpnpmare installed and available in the system PATH. - Repository Cloning: Clones the backend and frontend repositories if they do not already exist in the current folder.
- Secret Generation: Automatically generates a secure value for
AUTH_SECRETin.envif not already set. - Database Configuration: Prompts for the connection URL of an existing PostgreSQL database.
- Backend Setup: Synchronizes Python dependencies using
uv(creates virtual environments and links them). - Frontend Setup: Installs and builds frontend dependencies using
pnpm.
Usage
-
Create a folder and enter it:
mkdir AITradingSystemcd AITradingSystem -
Download the installation script:
wget https://raw.githubusercontent.com/QuantaGenesis/AITradingSystem/main/install.shchmod +x install.sh -
Run the interactive setup to configure your environment:
./install.sh setup -
Once the setup completes, start the application:
./install.sh start
Script source
The script lives at the root of the repository: install.sh.
note
The script is designed to be idempotent — running it again on an existing installation pulls the latest images and restarts the stack without data loss.