Skip to content

Commit

Permalink
Add Valkey Plugin (jetify-com#2154)
Browse files Browse the repository at this point in the history
## Summary
Added a plugin for Valkey, including environment variables, default conf
file, and a service
Added Docs And Example Files
Addresses jetify-com#2153 

## How was it tested?

- compile
- `valkey-server $VALKEY_CONF --port $VALKEY_PORT`

---------

Co-authored-by: John Lago <750845+Lagoja@users.noreply.github.com>
  • Loading branch information
captainseeker and Lagoja authored Aug 1, 2024
1 parent 31361ee commit fd82154
Show file tree
Hide file tree
Showing 11 changed files with 2,797 additions and 0 deletions.
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

0 comments on commit fd82154

Please sign in to comment.