File tree Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -81,10 +81,22 @@ There is a `docker-compose-redis-only.yml` file in the root of this repository
8181that you can use to start a Redis server locally. Just run:
8282
8383``` bash
84- docker compose -f docker-compose-redis-only.yml u
84+ docker compose -f docker-compose-redis-only.yml up -d
8585```
8686
87- This will start a Redis server on ` localhost:6379 ` , without any password.
87+ This will spin up a Redis server on ` localhost:6379 ` , without any password,
88+ running in the background. You can stop it with:
89+
90+ ``` bash
91+ docker compose -f docker-compose-redis-only.yml down
92+ ```
93+
94+ The image is based on
95+ [ redis/redis-stack] ( https://redis.io/docs/install/install-stack/docker/ ) so also
96+ includes [ RedisInsight] ( https://redis.io/docs/connect/insight/ ) running on port
97+ ` 8001 ` that you can use to inspect the Redis server.
98+
99+ ** Note that this is a development server and should not be used in production.**
88100
89101### Initialize Redis in your FastAPI application
90102
Original file line number Diff line number Diff line change 1- version : " 3.8"
21services :
32 cache :
4- image : redis:7.2-alpine
3+ image : redis/redis-stack:latest
54 restart : always
65 ports :
76 - " 6379:6379"
8- command : redis-server --save 20 1
7+ - " 8001:8001 "
98 volumes :
109 - cache:/data
1110volumes :
You can’t perform that action at this time.
0 commit comments