Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: updated instruction for local setup in mac OS #76

Merged
merged 1 commit into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Set the PQ_LIB_DIR environment variable for ensuring libpq is picked up by diesel and/or diesel_cli.
```bash
xcode-select --install
export PQ_LIB_DIR="$(brew --prefix libpq)/lib"
```
- 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 <br>
- `AWS Secret Access Key`: Test <br>
- `Default region name`: None <br>
- `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
Loading