diff --git a/.env.example b/.env.example index 1a98134e7..83d0886ac 100644 --- a/.env.example +++ b/.env.example @@ -5,7 +5,7 @@ AWS_SECRET_ACCESS_KEY=test AWS_SESSION_TOKEN=test AWS_REGION=ap-south-1 DB_USER=postgres -DB_HOST=dockerdns:5432 +DB_HOST=localhost:5432 DB_NAME=config APP_ENV=DEV AWS_REGION_ENDPOINT=http://localhost:4566 diff --git a/docs/setup.md b/docs/setup.md index 206b6a96c..34c813dcb 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -2,41 +2,75 @@ This document outlines the setup process for the `Superposition Platform`. -## Installation for linux/MacOS +## Installation for Linux/MacOS -- Install Rust using rustup - `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh` -- Install wasm-pack - `curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh` -- Install docker -- make sure you have dependencies like libpq, openssl, libiconv,etc installed -- make sure `make` command is installed - - Linux +- **Install** [rust](https://rustup.rs). + +- **Install** [wasm-pack](https://rustwasm.github.io/wasm-pack/installer/) + +- **Install Docker** + +- **Installing Lib Dependencies & Tools :**
+ `libpq`, `openssl`, `libiconv` are required for building the project. `diesel_cli` and `aws cli` is needed for dev. + + For MacOS : ```bash - sudo apt-get install build-essential + brew install libpq openssl libiconv awscli ``` - - MacOS + Don't forget to add libpq to `PATH`. ```bash - xcode-select --install + export PATH="/usr/local/opt/libpq/bin:$PATH" ``` -- Clone the repository + `diesel_cli` can be installed using `cargo`. + ```bash + cargo install diesel_cli --no-default-features --features postgres + ``` + +- **Configure AWS CLI** + ```bash + aws configure + ``` + Use the following values as input:
+ - `AWS Access Key ID`: Test + - `AWS Secret Access Key`: Test + - `Default region name`: None + - `Default output format`: None + +- **Ensure `make` Command is Installed** + - For Linux: + ```bash + sudo apt-get install build-essential + ``` + - For MacOS: + ```bash + xcode-select --install + ``` + +- **Clone the Repository** ```bash git clone https://github.com/juspay/superposition.git cd superposition ``` -- Start docker daemon - - Linux - ```bash - sudo systemctl start docker - ``` - - MacOS - ```bash - open --background -a Docker - ``` -- setup database and envs - `make setup` -- Run Superposition - `make run` + +- **Start Docker Daemon** + - For Linux: + ```bash + sudo systemctl start docker + ``` + - For MacOS: + ```bash + open --background -a Docker + ``` + +- **Setup Database and Environment Variables** + ```bash + make setup + ``` + +- **Run Superposition** + ```bash + make run + ``` ## Nix Installation diff --git a/makefile b/makefile index 8f9528d82..24e641f87 100644 --- a/makefile +++ b/makefile @@ -60,7 +60,6 @@ env-setup: npm ci -docker-compose up -d postgres localstack cp .env.example .env - sed -i 's/dockerdns/$(DOCKER_DNS)/g' ./.env while ! make validate-psql-connection validate-aws-connection; \ do echo "waiting for postgres, localstack bootup"; \ sleep 0.5; \