Redis Recipe
Configs
If you chose not to add Redis to your monorepo during the devon init
command, you can add it using the following recipe:
.devon/redis/.devconfig.ts
import type { ServiceConfig } from '@evilkiwi/devon';
export const config: ServiceConfig = {
compose: {
image: 'redis',
ports: ['62098:6379'],
volumes: [
'./.devon/.data/redis:/data',
],
restart: 'always',
},
};
.devon.ts
import type { DefinitionFile } from '@evilkiwi/devon';
export const config: DefinitionFile = {
...
services: [
...
{
name: 'redis',
path: '.devon/redis',
force: true, // Makes sure Redis _always_ boots
},
],
...
};
TIP
Make sure to re-run the devon switch
command to bring the new container up!