Skip to content

Commit 4677feb

Browse files
authored
add information on disabling plugins (#2232)
## Summary Add details on disabling plugins ## How was it tested? Localhost
1 parent 59a067c commit 4677feb

File tree

13 files changed

+188
-2
lines changed

13 files changed

+188
-2
lines changed

docs/app/docs/cli_reference/devbox_add.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ devbox add prometheus --outputs=out,cli
2929
| --- | --- |
3030
| `--allow-insecure` | allows Devbox to install a package that is marked insecure by Nix |
3131
| `-c, --config string` | path to directory containing a devbox.json config file |
32+
| `--disable-plugin` | disable the build plugin for a package |
33+
| `--environment string` | Jetify Secrets environment to use, when supported (e.g.secrets support dev, prod, preview.) (default "dev") |
3234
| `-e, --exclude-platform strings` | exclude packages from a specific platform. |
3335
| `-h, --help` | help for add |
3436
| `-o, --outputs strings` | specify the outputs to install for the nix package |

docs/app/docs/configuration.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ If you need to provide more options to your packages (such as limiting which pla
4747
// List of platforms to install the package on. Defaults to all platforms
4848
"platforms": [string],
4949
// List of platforms to exclude this package from. Defaults to no excluded platforms
50-
"excluded_platforms": [string]
50+
"excluded_platforms": [string],
51+
// Whether to disable a built-in plugin, if one exists for this package. Defaults to false
52+
"disable_plugin": boolean
5153
}
5254
}
5355
}
@@ -144,6 +146,21 @@ The platforms below are also supported, but require you to build packages from s
144146
* `i686-linux`
145147
* `armv7l-linux`
146148

149+
#### Disabling Built-in Plugins
150+
151+
Some packages include builtin plugins or services that are automatically started when the package is installed. You can disable these plugins using `devbox add <package> --disable-plugin`, or by setting the `disable_plugin` field to `true` in your package definition:
152+
153+
```json
154+
{
155+
"packages": {
156+
"glibcLocales": {
157+
"version": "latest",
158+
"disable_plugin": true
159+
}
160+
}
161+
}
162+
```
163+
147164
### Env
148165

149166
This is a a map of key-value pairs that should be set as Environment Variables when activating `devbox shell`, running a script with `devbox run`, or starting a service. These variables will only be set in your Devbox shell, and will have precedence over any environment variables set in your local machine or by [Devbox Plugins](guides/plugins.md).

docs/app/docs/devbox_examples/databases/mariadb.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,18 @@ These files are used to setup your database and service, and should not be modif
6868
"MYSQL_UNIX_PORT": "/<some-other-path>/mysql.sock"
6969
}
7070
```
71+
72+
### Disabling the MariaDB Plugin
73+
74+
You can disable the MariaDB plugin by running `devbox add mariadb --disable-plugin`, or by setting the `disable_plugin` field in your `devbox.json`:
75+
76+
```json
77+
{
78+
"packages": {
79+
"mariadb": {
80+
"version": "latest",
81+
"disable_plugin": true
82+
}
83+
}
84+
}
85+
```

docs/app/docs/devbox_examples/databases/mysql.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,18 @@ These files are used to setup your database and service, and should not be modif
7171
"MYSQL_UNIX_PORT": "/<some-other-path>/mysql.sock"
7272
}
7373
```
74+
75+
### Disabling the MySQL PLugin
76+
77+
You can disable the built-in MySQL plugin using `devbox add mysql80 --disable-plugin`, or by setting the `disable_plugin` field to `true` in your package definition:
78+
79+
```json
80+
{
81+
"packages": {
82+
"mysql80": {
83+
"version": "latest",
84+
"disable_plugin": true
85+
}
86+
}
87+
}
88+
```

docs/app/docs/devbox_examples/databases/postgres.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,18 @@ createuser -s -r your_new_user_name
6767
Replace `your_new_user_name` with the desired username for the new superuser.
6868

6969
Remember: Creating a superuser grants them significant power over the database system, so it should be done cautiously and only when absolutely necessary due to the potential security implications.
70+
71+
### Disabling the Postgres Plugin
72+
73+
You can disable the Postgres plugin by running `devbox add postgresql --disable-plugin`, or by setting the `disable_plugin` field to `true` in your package definition:
74+
75+
```json
76+
{
77+
"packages": {
78+
"postgresql": {
79+
"version": "latest",
80+
"disable_plugin": true
81+
}
82+
}
83+
}
84+
```

docs/app/docs/devbox_examples/databases/redis.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,18 @@ Running `devbox services start redis` will start redis as a daemon in the backgr
5151
You can manually start Redis in the foreground by running `redis-server $REDIS_CONF --port $REDIS_PORT`.
5252

5353
Logs, pidfile, and data dumps are stored in `.devbox/virtenv/redis`. You can change this by modifying the `dir` directive in `devbox.d/redis/redis.conf`
54+
55+
### Disabling the Redis Plugin
56+
57+
You can disable the Redis plugin by running `devbox add redis --disable-plugin`, or by setting the `disable_plugin` field in your `devbox.json`:
58+
59+
```json
60+
{
61+
"packages": {
62+
"redis": {
63+
"version": "latest",
64+
"disable_plugin": true
65+
}
66+
}
67+
}
68+
```

docs/app/docs/devbox_examples/databases/valkey.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,18 @@ Running `devbox services start valkey` will start valkey as a daemon in the back
5151
You can manually start Valkey in the foreground by running `valkey-server $VALKEY_CONF --port $VALKEY_PORT`.
5252

5353
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`
54+
55+
### Disabling the Valkey Plugin
56+
57+
You can disable the Valkey plugin by running `devbox add valkey --disable-plugin`, or by setting the `disable_plugin` field in your `devbox.json`:
58+
59+
```json
60+
{
61+
"packages": {
62+
"valkey": {
63+
"version" : "latest",
64+
"disable_plugin": true
65+
}
66+
}
67+
}
68+
```

docs/app/docs/devbox_examples/languages/php.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,18 @@ PHPRC={PROJECT_DIR}/devbox.d/php/php.ini
6565
* \{PROJECT_DIR\}/devbox.d/php81/php.ini
6666

6767
You can modify these files to configure PHP or your PHP-FPM server
68+
69+
### Disabling the PHP Plugin
70+
71+
You can disable the PHP plugin by running `devbox add php --disable-plugin`, or by setting the `disable_plugin` field in your `devbox.json`:
72+
73+
```json
74+
{
75+
"packages": {
76+
"php": {
77+
"version": "latest",
78+
"disable_plugin": true
79+
}
80+
}
81+
}
82+
```

docs/app/docs/devbox_examples/languages/python.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,3 +124,17 @@ You can install Poetry by adding it to the packages in your `devbox.json`. You c
124124
}
125125
```
126126
This init_hook will automatically start Poetry's virtualenv when you run `devbox shell`, and provide you with access to all your packages.
127+
128+
## Disabling the Python Plugin
129+
130+
If you would prefer to disable the Python Plugin, you can add python using `devbox add python --disable_plugin` or in your `devbox.json`:
131+
132+
```json
133+
{
134+
"packages": {
135+
"python": {
136+
"version": "3.10",
137+
"disable_plugin": true
138+
}
139+
}
140+
}

docs/app/docs/devbox_examples/languages/ruby.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,24 @@ GEM_HOME={PROJECT_DIR}/.devbox/virtenv/ruby
3636
PATH={PROJECT_DIR}/.devbox/virtenv/ruby/bin:$PATH
3737
```
3838

39+
### Disabling the Ruby Plugin
40+
41+
You can disable the Ruby plugin by running `devbox add ruby --disable-plugin`, or by setting the `disable_plugin` field in your `devbox.json`:
42+
43+
```json
44+
{
45+
"packages": {
46+
"ruby": {
47+
"version": "3.1",
48+
"disable_plugin": true
49+
},
50+
"bundler": {
51+
"version": "latest",
52+
}
53+
},
54+
}
55+
```
56+
3957
## Bundler
4058

4159
In case you are using bundler to install gems, bundler config file can still be used to pass configs and flags to install gems.
@@ -44,4 +62,4 @@ In case you are using bundler to install gems, bundler config file can still be
4462

4563
```dotenv
4664
BUNDLE_BUILD__SASSC: "--disable-lto"
47-
```
65+
```

0 commit comments

Comments
 (0)