Skip to content

Commit fd82154

Browse files
Add Valkey Plugin (#2154)
## Summary Added a plugin for Valkey, including environment variables, default conf file, and a service Added Docs And Example Files Addresses #2153 ## How was it tested? - compile - `valkey-server $VALKEY_CONF --port $VALKEY_PORT` --------- Co-authored-by: John Lago <[email protected]>
1 parent 31361ee commit fd82154

File tree

11 files changed

+2797
-0
lines changed

11 files changed

+2797
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
title: Valkey
3+
---
4+
5+
Valkey can be configured automatically using Devbox's built in Valkey plugin. This plugin will activate automatically when you install Valkey using `devbox add valkey`
6+
7+
[**Example Repo**](https://github.com/jetify-com/devbox/tree/main/examples/databases/valkey)
8+
9+
[![Open In Devbox.sh](https://www.jetify.com/img/devbox/open-in-devbox.svg)](https://devbox.sh/open/templates/valkey)
10+
11+
## Adding Valkey to your shell
12+
13+
`devbox add valkey`, or in your Devbox.json
14+
15+
```json
16+
"packages": [
17+
"valkey@latest "
18+
],
19+
```
20+
21+
This will install the latest version of Valkey. You can find other installable versions of Valkey by running `devbox search valkey`. You can also view the available versions on [Nixhub](https://www.nixhub.io/packages/valkey)
22+
23+
## Valkey Plugin Details
24+
25+
The Valkey plugin will automatically create the following configuration when you install Valkey with `devbox add`
26+
27+
### Services
28+
29+
* valkey
30+
31+
Use `devbox services start|stop [service]` to interact with services
32+
33+
### Helper Files
34+
35+
The following helper files will be created in your project directory:
36+
37+
* \{PROJECT_DIR\}/devbox.d/valkey/valkey.conf
38+
39+
40+
### Environment Variables
41+
42+
```bash
43+
VALKEY_PORT=6379
44+
VALKEY_CONF=./devbox.d/valkey/valkey.conf
45+
```
46+
47+
### Notes
48+
49+
Running `devbox services start valkey` will start valkey as a daemon in the background.
50+
51+
You can manually start Valkey in the foreground by running `valkey-server $VALKEY_CONF --port $VALKEY_PORT`.
52+
53+
Logs, pidfile, and data dumps are stored in `.devbox/virtenv/valkey`. You can change this by modifying the `dir` directive in `devbox.d/valkey/valkey.conf`

docs/app/docs/guides/plugins.md

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Built-in plugins are available for the following packages. You can activate the
3030
* [MySQL](../devbox_examples/databases/mysql.md) (mysql80, mysql57)
3131
* [PostgreSQL](../devbox_examples/databases/postgres.md) (postgresql)
3232
* [Redis](../devbox_examples/databases/redis.md) (redis)
33+
* [Valkey](../devbox_examples/databases/valkey.md) (valkey)
3334
* [PHP](../devbox_examples/languages/php.md) (php, php80, php81, php82...)
3435
* [Pip](../devbox_examples/languages/python.md) (python39Packages.pip, python310Packages.pip, python311Packages.pip...)
3536
* [Ruby](../devbox_examples/languages/ruby.md)(ruby, ruby_3_1, ruby_3_0...)

docs/app/docs/guides/services.md

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ The following plugins provide a pre-configured service that can be managed with
4343
* [Nginx](../devbox_examples/servers/nginx.md) (nginx)
4444
* [PostgreSQL](../devbox_examples/databases/postgres.md) (postgresql)
4545
* [Redis](../devbox_examples/databases/redis.md) (redis)
46+
* [Valkey](../devbox_examples/databases/valkey.md) (valkey)
4647
* [PHP](../devbox_examples/languages/php.md) (php, php80, php81, php82)
4748

4849
The service will be made available to your project when you install the packages using `devbox add`.

examples/databases/valkey/README.md

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# valkey-7.2.5
2+
3+
## valkey Notes
4+
5+
Running `devbox services start valkey` will start valkey as a daemon in the background.
6+
7+
You can manually start Valkey in the foreground by running `valkey-server $VALKEY_CONF --port $VALKEY_PORT`.
8+
9+
Logs, pidfile, and data dumps are stored in `.devbox/virtenv/valkey`. You can change this by modifying the `dir` directive in `devbox.d/valkey/valkey.conf`
10+
11+
## Services
12+
13+
* valkey
14+
15+
Use `devbox services start|stop [service]` to interact with services
16+
17+
## This plugin creates the following helper files
18+
19+
* ./devbox.d/valkey/valkey.conf
20+
21+
## This plugin sets the following environment variables
22+
23+
* VALKEY_PORT=6379
24+
* VALKEY_CONF=./devbox.d/valkey/valkey.conf
25+
26+
To show this information, run `devbox info valkey`

0 commit comments

Comments
 (0)