Skip to content

Add Valkey Plugin #2154

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions docs/app/docs/devbox_examples/databases/valkey.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
title: Valkey
---

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`

[**Example Repo**](https://github.com/jetify-com/devbox/tree/main/examples/databases/valkey)

[![Open In Devbox.sh](https://www.jetify.com/img/devbox/open-in-devbox.svg)](https://devbox.sh/open/templates/valkey)

## Adding Valkey to your shell

`devbox add valkey`, or in your Devbox.json

```json
"packages": [
"valkey@latest "
],
```

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)

## Valkey Plugin Details

The Valkey plugin will automatically create the following configuration when you install Valkey with `devbox add`

### Services

* valkey

Use `devbox services start|stop [service]` to interact with services

### Helper Files

The following helper files will be created in your project directory:

* \{PROJECT_DIR\}/devbox.d/valkey/valkey.conf


### Environment Variables

```bash
VALKEY_PORT=6379
VALKEY_CONF=./devbox.d/valkey/valkey.conf
```

### Notes

Running `devbox services start valkey` will start valkey as a daemon in the background.

You can manually start Valkey in the foreground by running `valkey-server $VALKEY_CONF --port $VALKEY_PORT`.

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`
1 change: 1 addition & 0 deletions docs/app/docs/guides/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Built-in plugins are available for the following packages. You can activate the
* [MySQL](../devbox_examples/databases/mysql.md) (mysql80, mysql57)
* [PostgreSQL](../devbox_examples/databases/postgres.md) (postgresql)
* [Redis](../devbox_examples/databases/redis.md) (redis)
* [Valkey](../devbox_examples/databases/valkey.md) (valkey)
* [PHP](../devbox_examples/languages/php.md) (php, php80, php81, php82...)
* [Pip](../devbox_examples/languages/python.md) (python39Packages.pip, python310Packages.pip, python311Packages.pip...)
* [Ruby](../devbox_examples/languages/ruby.md)(ruby, ruby_3_1, ruby_3_0...)
Expand Down
1 change: 1 addition & 0 deletions docs/app/docs/guides/services.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ The following plugins provide a pre-configured service that can be managed with
* [Nginx](../devbox_examples/servers/nginx.md) (nginx)
* [PostgreSQL](../devbox_examples/databases/postgres.md) (postgresql)
* [Redis](../devbox_examples/databases/redis.md) (redis)
* [Valkey](../devbox_examples/databases/valkey.md) (valkey)
* [PHP](../devbox_examples/languages/php.md) (php, php80, php81, php82)

The service will be made available to your project when you install the packages using `devbox add`.
Expand Down
26 changes: 26 additions & 0 deletions examples/databases/valkey/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# valkey-7.2.5

## valkey Notes

Running `devbox services start valkey` will start valkey as a daemon in the background.

You can manually start Valkey in the foreground by running `valkey-server $VALKEY_CONF --port $VALKEY_PORT`.

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`

## Services

* valkey

Use `devbox services start|stop [service]` to interact with services

## This plugin creates the following helper files

* ./devbox.d/valkey/valkey.conf

## This plugin sets the following environment variables

* VALKEY_PORT=6379
* VALKEY_CONF=./devbox.d/valkey/valkey.conf

To show this information, run `devbox info valkey`
Loading