Skip to content

Commit

Permalink
fix: updated instruction for local setup in mac OS
Browse files Browse the repository at this point in the history
  • Loading branch information
Subhash Chandra authored and Subhash703 committed May 31, 2024
1 parent d2ab501 commit 9db18eb
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
86 changes: 60 additions & 26 deletions docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 :** <br>
`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: <br>
- `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
Expand Down
1 change: 0 additions & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Expand Down

0 comments on commit 9db18eb

Please sign in to comment.