1. Prepare the environment
Clone the Repository
Clone the repository to your local machine:
git clone https://github.com/fiamma-chain/operator_for_linux.git
cd operator_for_linux
Prepare the Environment
Run the setup script to install all dependencies and prepare your environment:
./setup.sh
Important: After the first execution of setup.sh
, you need to enable the Rust environment variables:
source "$HOME/.cargo/env"
Alternatively, you can restart your terminal or run:
source ~/.bashrc
# or if you're using zsh:
source ~/.zshrc
This script will:
Install required packages (build-essential, gcc, g++, libssl-dev)
Install and configure PostgreSQL
Install Docker and Docker Compose (if not already installed)
Install Rust and SQLx CLI
Create a default .env file from .env_example
Start database and Redis containers
Set execute permissions on scripts
Database Setup
Run database migrations to set up the required database schema:
cd dal && cp .env.example .env && sqlx migrate run && cd ..
Last updated