Add Redis
A Redis datastore works the same way as Postgres. Create it, then give its URL with a reference.
Terminal
$ ferry db create cache --kind redis --wait$ ferry env set notes 'REDIS_URL=${{datastore.cache.connectionString}}'# REDIS_URL=redis://default:<password>@cache:6379, and notes restartsWhat the two commands do
| Command | Result |
|---|---|
ferry db create cache --kind redis --wait | A Redis datastore with the name cache. |
ferry env set notes … | notes gets REDIS_URL with a reference, and restarts. |
In the containers of notes, the value is redis://default:<password>@cache:6379.
See Datastores, Environment and Jobs & cron for the full story.