Skip to content

Commit 0af704f

Browse files
committed
Add Readmes
1 parent 52c53cb commit 0af704f

File tree

6 files changed

+98
-8
lines changed

6 files changed

+98
-8
lines changed

README.md

+18-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,18 @@
1-
# Repository for Devbox Plugins
1+
# Devbox Plugins
2+
3+
This repository includes plugins for configuring packages using Devbox.
4+
5+
## Available Plugins
6+
7+
* MongoDB
8+
* RabbitMQ
9+
10+
## How to Use
11+
12+
Each subfolder contains a plugin for a specific package. To use a plugin, add the following reference to the `include` section of your `devbox.json` file.
13+
14+
```json
15+
"includes": [
16+
"github:jetpack-io/devbox-plugins?dir=<plugin-name>"
17+
],
18+
```

mongodb/README.md

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# MongoDB Plugin
2+
3+
Plugin for the [`mongodb`](https://www.nixhub.io/packages/mongodb) package. This plugin configures MonogoDB to use a local config file and data directory for this project, and configures a mongodb service.
4+
5+
## How to Activate
6+
7+
To install MongoDB, run `devbox add mongodb@latest`. We also recommend installing the [`mongosh`](https://nixhub.io/packages/mongosh) client with `devbox add mongosh@latest`.
8+
9+
To activate this plugin, add the following reference to the `include` section of your `devbox.json` file.
10+
11+
```json
12+
13+
"include": [
14+
"github:jetpack-io/devbox-plugins?dir=mongodb"
15+
],
16+
```
17+
18+
## Services
19+
20+
* mongodb
21+
22+
Use `devbox services up mongodb` to start the mongodb server.
23+
24+
## Files
25+
26+
This plugin creates the following helper files:
27+
28+
* **devbox.d/mongodb/mongod.conf** - MongoDB configuration file
29+
* **.devbox/virtenv/mongodb/data** - empty directory for holding your mongodb database
30+
* **.devbox/virtenv/rabbitmq/process-compose.yaml** - Defines the process to start the MongoDB server
31+
32+
## Environment Variables
33+
34+
This plugin sets the following environment variables:
35+
36+
* **MONGODB_CONFIG** = {{.DevboxDir}}/mongod.conf
37+
* **MONGODB_DATA** = {{.Virtenv}}/data

mongodb/plugin.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
22
"name": "mongodb",
33
"version": "0.0.1",
4-
"match": "^mongodb-[0-9_]$",
5-
"readme": "MongoDB plugin",
4+
"readme": "Plugin for the [`mongodb`](https://www.nixhub.io/packages/mongodb) package. This plugin configures MonogoDB to use a local config file and data directory for this project, and configures a mongodb service.",
65
"env": {
76
"MONGODB_DATA": "{{.Virtenv}}/data",
87
"MONGODB_CONFIG": "{{.DevboxDir}}/mongod.conf"

rabbitmq/README.md

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# RabbitMQ Plugin
2+
3+
Plugin for the [`rabbitmq-server`](https://www.nixhub.io/packages/rabbitmq-server) package. This plugin sets several `RABBITMQ` environment variables to run an instance of RabbitMQ in your local project, adds a `rabbitmq.conf` file to the devbox.d directory, and configures a RabbitMQ service.
4+
5+
## How to Activate
6+
7+
To install RabbitMQ, run `devbox add rabbitmq-server@latest`
8+
9+
To activate this plugin, add the following reference to the `include` section of your `devbox.json` file.
10+
11+
```json
12+
13+
"include": [
14+
"github:jetpack-io/devbox-plugins?dir=rabbitmq"
15+
],
16+
```
17+
18+
## Services
19+
20+
* rabbitmq
21+
22+
Use `devbox services up rabbitmq` to start the RabbitMQ server
23+
24+
## Files
25+
26+
This plugin creates the following helper files:
27+
28+
* **devbox.d/rabbitmq/conf.d/rabbitmq.conf** - RabbitMQ configuration file
29+
* **.devbox/virtenv/rabbitmq/process-compose.yaml** - Defines the process to start the RabbitMQ server
30+
31+
## Environment Variables
32+
33+
This plugin sets the following environment variables:
34+
35+
* **RABBITMQ_CONFIG_FILE** = {{.DevboxDir}}/conf.d
36+
* **RABBITMQ_MNESIA_BASE** = {{.Virtenv}}/mnesia
37+
* **RABBITMQ_ENABLED_PLUGINS_FILE** = {{.DevboxDir}}/conf.d/enabled_plugins
38+
* **RABBITMQ_LOG_BASE** = {{.Virtenv}}/log
39+
* **RABBITMQ_NODENAME** = rabbit
40+
* **RABBITMQ_PID_FILE** = {{.Virtenv}}/pid/$RABBITMQ_NODENAME.pid

rabbitmq/config/process-compose.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ processes:
1010
shutdown:
1111
command: "rabbitmqctl shutdown"
1212
rabbitmq-logs:
13-
command: "tail -f $RABBITMQ_LOG_BASE/$RABBITMQ_NODENAME@$HOST.log"
13+
command: "tail -f $RABBITMQ_LOG_BASE/$RABBITMQ_NODENAME@$(hostname -s).log"
1414
availability:
1515
restart: "always"

rabbitmq/plugin.json

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
{
22
"name": "rabbitmq",
33
"version": "0.0.1",
4-
"packages": [
5-
"rabbitmq-server@latest"
6-
],
7-
"readme": "RabbitMQ plugin",
4+
"readme": "Plugin for the RabbitMQ Server. This plugin sets several RABBITMQ environment variables to run an instance of RabbitMQ in your local project, adds a rabbitmq.conf file to the devbox.d directory, and configures a RabbitMQ service.",
85
"env": {
96
"RABBITMQ_CONFIG_FILES": "{{.DevboxDir}}/conf.d",
107
"RABBITMQ_MNESIA_BASE": "{{.Virtenv}}/mnesia",

0 commit comments

Comments
 (0)