Skip to content

Commit 9aeb269

Browse files
author
Andrew Brookins
committed
Add notes on virtualenvs, etc.
1 parent 9606a57 commit 9aeb269

File tree

1 file changed

+24
-27
lines changed

1 file changed

+24
-27
lines changed

docs/getting_started.md

Lines changed: 24 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,15 @@ Redis doesn't run directly on Windows, but you can use Windows Subsystem for Lin
3535

3636
Windows users can also use Docker. See the next section on running Redis with Docker for more information.
3737

38-
### Running Redis With Docker
38+
### Using Redis With Docker
3939

40-
Instead of installing Redis manually or with a package manager, you can run Redis with Docker. The official Redis Docker image is hosted on [Docker Hub](https://hub.docker.com/_/redis).
40+
Instead of installing Redis manually or with a package manager, you can run Redis with Docker.
4141

42-
**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.
42+
We recommend the [redismod](https://hub.docker.com/r/redislabs/redismod) image because it includes Redis modules that Redis OM can use to give you extra features. Later sections of this guide will provide more detail about these features.
4343

44-
You start Redis with Docker with the `docker run` command, like this:
44+
You can also use the official Redis Docker image, which is hosted on [Docker Hub](https://hub.docker.com/_/redis).
4545

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.
46+
**NOTE**: We'll talk about how to actually start Redis with Docker when we discuss _running_ Redis later in this guide.
4947

5048
## Recommended: RediSearch and RedisJSON
5149

@@ -55,59 +53,58 @@ You don't need these Redis modules to use Redis OM's data modeling, validation,
5553

5654
The easiest way to run these Redis modules during local development is to use the [redismod](https://hub.docker.com/r/redislabs/redismod) Docker image.
5755

58-
You can quickly start Redis with the redismod Docker image by running the following command:
59-
60-
docker run -d -p 6379:6379 redislabs/redismod
61-
62-
**TIP:** The `-d` option runs Redis in the background.
63-
64-
For other installation methods, follow the "Quick Start" guides on both modules' home pages for alternative installation methods.
56+
For other installation methods, follow the "Quick Start" guides on both modules' home pages.
6557

66-
## Start Redis
58+
## Starting Redis
6759

6860
Before you get started with Redis OM, make sure you start Redis.
6961

70-
The command you use to start Redis will depend on how you installed it.
62+
The command to start Redis will depend on how you installed it.
7163

7264
### Ubuntu Linux (Including WSL)
7365

7466
If you installed Redis using `apt`, start it with the `systemctl` command:
7567

76-
sudo systemctl restart redis.service
68+
$ sudo systemctl restart redis.service
7769

7870
Otherwise, you can start the server manually:
7971

80-
redis-server start
72+
$ redis-server start
8173

8274
### macOS with Homebrew
8375

84-
brew services start redis
76+
$ brew services start redis
8577

8678
### Docker
8779

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

82+
**TIP:** The `-d` option in these examples runs Redis in the background, while `-p 6379:6379` makes Redis reachable at port 6379 on your localhost.
83+
9084
#### Docker with the `redismod` image (recommended)
9185

92-
docker run -d -p 6379:6379 redislabs/redismod
86+
$ docker run -d -p 6379:6379 redislabs/redismod
9387

9488
### Docker with the `redis` image
9589

96-
docker run -d -p 6379:6379 redis
90+
$ docker run -d -p 6379:6379 redis
9791

9892
## Installing Redis OM
9993

100-
You can install Redis OM with `pip` by running the following command:
94+
The recommended way to install Redis OM is with [Poetry](https://python-poetry.org/docs/). You can install Redis OM using Poetry with the following command:
95+
96+
$ poetry install redis-om
97+
98+
If you're using Pipenv, the command is:
10199

102-
pip install redis-om
100+
$ pipenv install redis-om
103101

104-
Or, if you're using Poetry, you can install Redis OM with the following command:
102+
Finally, you can install Redis OM with `pip` by running the following command:
105103

106-
poetry install redis-om
104+
$ pip install redis-om
107105

108-
With Pipenv, the command is:
106+
**TIP:** If you aren't using Poetry or Pipenv and are instead installing directly with `pip`, we recommend that you install Redis OM in a virtual environment (AKA, a virtualenv). If you aren't familiar with this concept, see [Dan Bader's video and transcript](https://realpython.com/lessons/creating-virtual-environment/).
109107

110-
pipenv install redis-om
111108

112109
## Setting the Redis URL Environment Variable
113110

0 commit comments

Comments
 (0)