Skip to content

Commit 9606a57

Browse files
author
Andrew Brookins
committed
Fix mangled CLI examples
1 parent 4111330 commit 9606a57

File tree

1 file changed

+29
-16
lines changed

1 file changed

+29
-16
lines changed

docs/getting_started.md

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ Instead of installing Redis manually or with a package manager, you can run Redi
4141

4242
**TIP:** If you plan on using Docker, we recommend the [redismod](https://hub.docker.com/r/redislabs/redismod) image because it includes the RediSearch and RedisJSON modules.
4343

44+
You start Redis with Docker with the `docker run` command, like this:
45+
46+
docker run -d -p 6379:6379 redislabs/redismod
47+
48+
**NOTE**: We'll talk more about this command (specifically, the arguments chosen) when we discuss running Redis later in this guide.
49+
4450
## Recommended: RediSearch and RedisJSON
4551

4652
Redis OM relies on the [RediSearch][redisearch-url] and [RedisJSON][redis-json-url] Redis modules to support [rich queries](querying.md) and [embedded models](embedded_models.md).
@@ -51,7 +57,8 @@ The easiest way to run these Redis modules during local development is to use th
5157

5258
You can quickly start Redis with the redismod Docker image by running the following command:
5359

54-
docker run -d -p 6379:6379 redislabs/redismod
60+
docker run -d -p 6379:6379 redislabs/redismod
61+
5562
**TIP:** The `-d` option runs Redis in the background.
5663

5764
For other installation methods, follow the "Quick Start" guides on both modules' home pages for alternative installation methods.
@@ -66,38 +73,41 @@ The command you use to start Redis will depend on how you installed it.
6673

6774
If you installed Redis using `apt`, start it with the `systemctl` command:
6875

69-
sudo systemctl restart redis.service
76+
sudo systemctl restart redis.service
77+
7078
Otherwise, you can start the server manually:
7179

72-
redis-server start
80+
redis-server start
7381

7482
### macOS with Homebrew
7583

76-
brew services start redis
84+
brew services start redis
7785

7886
### Docker
7987

8088
The command to start Redis with Docker depends on the image you've chosen to use.
8189

82-
#### Docker with the redismod image (recommended)
90+
#### Docker with the `redismod` image (recommended)
8391

84-
docker run -d -p 6379:6379 redislabs/redismod
92+
docker run -d -p 6379:6379 redislabs/redismod
8593

86-
### Docker iwth the redis image
94+
### Docker with the `redis` image
8795

88-
docker run -d -p 6379:6379 redis
96+
docker run -d -p 6379:6379 redis
8997

9098
## Installing Redis OM
9199

92100
You can install Redis OM with `pip` by running the following command:
93101

94-
pip install redis-om
102+
pip install redis-om
103+
95104
Or, if you're using Poetry, you can install Redis OM with the following command:
96105

97-
poetry install redis-om
106+
poetry install redis-om
107+
98108
With Pipenv, the command is:
99109

100-
pipenv install redis-om
110+
pipenv install redis-om
101111

102112
## Setting the Redis URL Environment Variable
103113

@@ -109,16 +119,19 @@ However, if you configured Redis to run on a different port, or if you're using
109119

110120
The `REDIS_URL` environment variable follows the redis-py URL format:
111121

112-
redis://[[username]:[password]]@localhost:6379/[database number]
113-
The default connection is eqivalent to the following `REDIS_URL` environment variable:
122+
redis://[[username]:[password]]@localhost:6379/[database number]
123+
124+
The default connection is equivalent to the following `REDIS_URL` environment variable:
125+
126+
redis://@localhost:6379
114127

115-
redis://@localhost:6379
116128
**TIP:** Redis databases are numbered, and the default is 0. You can leave off the database number to use the default database.
117129

118130
Other supported prefixes include "rediss" for SSL connections and "unix" for Unix domain sockets:
119131

120-
rediss://[[username]:[password]]@localhost:6379/0
121-
unix://[[username]:[password]]@/path/to/socket.sock?db=0
132+
rediss://[[username]:[password]]@localhost:6379/0
133+
unix://[[username]:[password]]@/path/to/socket.sock?db=0
134+
122135
For more details about how to connect to Redis with Redis OM, see the [connections documentation](connections.md).
123136

124137
### Redis Cluster Support

0 commit comments

Comments
 (0)