diff --git a/README.md b/README.md index 543ca11..cd94e51 100644 --- a/README.md +++ b/README.md @@ -2,34 +2,41 @@ ## Build & Run from Source -- Build +To build the binary from the source, use the following command: - ```bash - ./scripts/build.sh - ``` +```bash +./scripts/build.sh +``` -- Run +Before running, copy the example environment file to .env and configure it with the correct values: - ```bash - cp .env.example .env; - ./build/nuklai-feed - ``` +```bash +cp .env.example .env; +``` + +Then, run the application: -- Database Operations +```bash +./build/nuklai-feed +``` - You can use the scripts/db.sh script to interact with the SQLite database. +NOTE: Make sure to have the correct values for PostgreSQL in your .env file. - - Get All Feeds: +### Database Operations - ```bash - ./scripts/db.sh get-all-transactions - ``` +You can use the scripts/db.sh script to interact with the SQLite database. - - Get Feed by TxID: +- Get All Feeds: - ```bash - ./scripts/db.sh get-feed-by-txid - ``` + ```bash + ./scripts/db.sh get-all-transactions + ``` + +- Get Feed by TxID: + + ```bash + ./scripts/db.sh get-feed-by-txid + ``` - Get Feeds by user: @@ -39,20 +46,26 @@ ## Build & Run with Docker -- Build +To build the Docker image, use the following command: - ```bash - docker build -t nuklai-feed . - ``` +```bash +./scripts/build.sh docker +``` -- Run +Start the Docker containers: - ```bash - ./scripts/run_docker.sh - ``` +```bash +./scripts/run_docker.sh start +``` -- Stop the docker container +To stop the Docker containers: - ```bash - docker container stop nuklai-feed - ``` +```bash +./scripts/run_docker.sh stop +``` + +To view the logs of the Docker container: + +```bash +./scripts/run_docker.sh logs +```