Skip to content

Commit

Permalink
Development instructions updated in README
Browse files Browse the repository at this point in the history
  • Loading branch information
arpitbbhayani committed Dec 16, 2024
1 parent 20a0206 commit 002c8ea
Showing 1 changed file with 31 additions and 46 deletions.
77 changes: 31 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
DiceDB Playground Backend
===
# DiceDB Playground Mono

DiceDB Playground is an interactive platform designed to let users experiment with [DiceDB](https://github.com/dicedb/dice/) commands in a live environment, similar to the Go Playground.
Allows users to search and play with various DiceDB commands in real-time.
[DiceDB Playground](https://playground.dicedb.io/) is an interactive platform designed to let users experiment with [DiceDB](https://github.com/dicedb/dice/) commands in a live environment. Allows users to search and play with various DiceDB commands in real-time. This repository hosts backend service implementation of the Playground.

This repository hosts backend service implementation of the Playground.

## How to contribute

The code contribution guidelines are published at [CONTRIBUTING.md](CONTRIBUTING.md); please read them before you start making any changes. This would allow us to have a consistent standard of coding practices and developer experience.

Contributors can join the [Discord Server](https://discord.gg/6r8uXWtXh7) for quick collaboration.

### Setting up this repository from source for development and contributions
### Setting up for development and contributions

To run playground-mono for local development or running from source, you will need

Expand All @@ -22,58 +12,53 @@ To run playground-mono for local development or running from source, you will ne
2. [OSX (Darwin) based environment](https://en.wikipedia.org/wiki/MacOS)
3. WSL under Windows
3. Install GoLangCI
```
$ sudo su
$ curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b /bin v1.60.1
```

### Steps to clone and run:
```sh
$ git clone https://github.com/dicedb/playground-mono
$ cd playground-mono
$ cp .env.sample .env
$ go run main.go
```bash
sudo su
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b /bin v1.60.1
```

### Running the Project Using Docker

#### 1. Clone the repository:
### Setup

```bash
```sh
git clone https://github.com/dicedb/playground-mono
cd playground-mono
cp .env.sample .env
```

#### 2. Navigate to the project directory:
> The default values of .env files works just fine, but
> feel free to tweak them as per your environment.
```bash
cd playground-mono
```
### Run

#### 3. Copy the sample environment file:
#### Pre-requisite

```bash
cp .env.sample .env
```
This creates the `.env` file, which stores your environment variables. Make sure to update any necessary values inside this file before running the server.
Playground-mono requires two running instances of DiceDB one on port `7379` and
other on port `7380`.

#### 4. Start the application using Docker Compose:
To setup and run DiceDB locally, please refer to the
[README.md file of DiceDB/dice](https://github.com/DiceDB/dice/blob/master/README.md).

```bash
docker compose up -d
```
This command will pull any necessary Docker images, build the containers, and run them in detached mode (`-d`).
> If you do not want to run two instances, due to hardware limitations, you can run one
> and change the .env file and update the appropriate values
#### 5. Verify the server is running:
#### Start the server

Open your browser and go to:
Once you have DiceDB running, run the following command and that will start
the playground-mono server on port `8080`.

```bash
http://localhost:8080/health
make run
```
This endpoint should return a status indicating that the server is up and running.

## Setting up Production Instance
## Setting up a Production instance

```
bash setup.sh
```

## How to contribute

The code contribution guidelines are published at [CONTRIBUTING.md](CONTRIBUTING.md); please read them before you start making any changes. This would allow us to have a consistent standard of coding practices and developer experience.

Contributors can join the [Discord Server](https://discord.gg/6r8uXWtXh7) for quick collaboration.

0 comments on commit 002c8ea

Please sign in to comment.