You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/getting_started.md
+24-27Lines changed: 24 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,17 +35,15 @@ Redis doesn't run directly on Windows, but you can use Windows Subsystem for Lin
35
35
36
36
Windows users can also use Docker. See the next section on running Redis with Docker for more information.
37
37
38
-
### Running Redis With Docker
38
+
### Using Redis With Docker
39
39
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.
41
41
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.
43
43
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).
45
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.
46
+
**NOTE**: We'll talk about how to actually start Redis with Docker when we discuss _running_ Redis later in this guide.
49
47
50
48
## Recommended: RediSearch and RedisJSON
51
49
@@ -55,59 +53,58 @@ You don't need these Redis modules to use Redis OM's data modeling, validation,
55
53
56
54
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.
57
55
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.
65
57
66
-
## Start Redis
58
+
## Starting Redis
67
59
68
60
Before you get started with Redis OM, make sure you start Redis.
69
61
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.
71
63
72
64
### Ubuntu Linux (Including WSL)
73
65
74
66
If you installed Redis using `apt`, start it with the `systemctl` command:
75
67
76
-
sudo systemctl restart redis.service
68
+
$ sudo systemctl restart redis.service
77
69
78
70
Otherwise, you can start the server manually:
79
71
80
-
redis-server start
72
+
$ redis-server start
81
73
82
74
### macOS with Homebrew
83
75
84
-
brew services start redis
76
+
$ brew services start redis
85
77
86
78
### Docker
87
79
88
80
The command to start Redis with Docker depends on the image you've chosen to use.
89
81
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
+
90
84
#### Docker with the `redismod` image (recommended)
91
85
92
-
docker run -d -p 6379:6379 redislabs/redismod
86
+
$ docker run -d -p 6379:6379 redislabs/redismod
93
87
94
88
### Docker with the `redis` image
95
89
96
-
docker run -d -p 6379:6379 redis
90
+
$ docker run -d -p 6379:6379 redis
97
91
98
92
## Installing Redis OM
99
93
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:
101
99
102
-
pip install redis-om
100
+
$ pipenv install redis-om
103
101
104
-
Or, if you're using Poetry, you can install Redis OM with the following command:
102
+
Finally, youcan install Redis OM with`pip` by running the following command:
105
103
106
-
poetry install redis-om
104
+
$ pip install redis-om
107
105
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/).
0 commit comments