Skip to content

add information on disabling plugins #2232

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 1 commit into from
Sep 4, 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
2 changes: 2 additions & 0 deletions docs/app/docs/cli_reference/devbox_add.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ devbox add prometheus --outputs=out,cli
| --- | --- |
| `--allow-insecure` | allows Devbox to install a package that is marked insecure by Nix |
| `-c, --config string` | path to directory containing a devbox.json config file |
| `--disable-plugin` | disable the build plugin for a package |
| `--environment string` | Jetify Secrets environment to use, when supported (e.g.secrets support dev, prod, preview.) (default "dev") |
| `-e, --exclude-platform strings` | exclude packages from a specific platform. |
| `-h, --help` | help for add |
| `-o, --outputs strings` | specify the outputs to install for the nix package |
Expand Down
19 changes: 18 additions & 1 deletion docs/app/docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ If you need to provide more options to your packages (such as limiting which pla
// List of platforms to install the package on. Defaults to all platforms
"platforms": [string],
// List of platforms to exclude this package from. Defaults to no excluded platforms
"excluded_platforms": [string]
"excluded_platforms": [string],
// Whether to disable a built-in plugin, if one exists for this package. Defaults to false
"disable_plugin": boolean
}
}
}
Expand Down Expand Up @@ -144,6 +146,21 @@ The platforms below are also supported, but require you to build packages from s
* `i686-linux`
* `armv7l-linux`

#### Disabling Built-in Plugins

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:

```json
{
"packages": {
"glibcLocales": {
"version": "latest",
"disable_plugin": true
}
}
}
```

### Env

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).
Expand Down
15 changes: 15 additions & 0 deletions docs/app/docs/devbox_examples/databases/mariadb.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,18 @@ These files are used to setup your database and service, and should not be modif
"MYSQL_UNIX_PORT": "/<some-other-path>/mysql.sock"
}
```

### Disabling the MariaDB Plugin

You can disable the MariaDB plugin by running `devbox add mariadb --disable-plugin`, or by setting the `disable_plugin` field in your `devbox.json`:

```json
{
"packages": {
"mariadb": {
"version": "latest",
"disable_plugin": true
}
}
}
```
15 changes: 15 additions & 0 deletions docs/app/docs/devbox_examples/databases/mysql.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,18 @@ These files are used to setup your database and service, and should not be modif
"MYSQL_UNIX_PORT": "/<some-other-path>/mysql.sock"
}
```

### Disabling the MySQL PLugin

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:

```json
{
"packages": {
"mysql80": {
"version": "latest",
"disable_plugin": true
}
}
}
```
15 changes: 15 additions & 0 deletions docs/app/docs/devbox_examples/databases/postgres.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,18 @@ createuser -s -r your_new_user_name
Replace `your_new_user_name` with the desired username for the new superuser.

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.

### Disabling the Postgres Plugin

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:

```json
{
"packages": {
"postgresql": {
"version": "latest",
"disable_plugin": true
}
}
}
```
15 changes: 15 additions & 0 deletions docs/app/docs/devbox_examples/databases/redis.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,18 @@ Running `devbox services start redis` will start redis as a daemon in the backgr
You can manually start Redis in the foreground by running `redis-server $REDIS_CONF --port $REDIS_PORT`.

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`

### Disabling the Redis Plugin

You can disable the Redis plugin by running `devbox add redis --disable-plugin`, or by setting the `disable_plugin` field in your `devbox.json`:

```json
{
"packages": {
"redis": {
"version": "latest",
"disable_plugin": true
}
}
}
```
15 changes: 15 additions & 0 deletions docs/app/docs/devbox_examples/databases/valkey.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,18 @@ Running `devbox services start valkey` will start valkey as a daemon in the back
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`

### Disabling the Valkey Plugin

You can disable the Valkey plugin by running `devbox add valkey --disable-plugin`, or by setting the `disable_plugin` field in your `devbox.json`:

```json
{
"packages": {
"valkey": {
"version" : "latest",
"disable_plugin": true
}
}
}
```
15 changes: 15 additions & 0 deletions docs/app/docs/devbox_examples/languages/php.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,18 @@ PHPRC={PROJECT_DIR}/devbox.d/php/php.ini
* \{PROJECT_DIR\}/devbox.d/php81/php.ini

You can modify these files to configure PHP or your PHP-FPM server

### Disabling the PHP Plugin

You can disable the PHP plugin by running `devbox add php --disable-plugin`, or by setting the `disable_plugin` field in your `devbox.json`:

```json
{
"packages": {
"php": {
"version": "latest",
"disable_plugin": true
}
}
}
```
14 changes: 14 additions & 0 deletions docs/app/docs/devbox_examples/languages/python.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,17 @@ You can install Poetry by adding it to the packages in your `devbox.json`. You c
}
```
This init_hook will automatically start Poetry's virtualenv when you run `devbox shell`, and provide you with access to all your packages.

## Disabling the Python Plugin

If you would prefer to disable the Python Plugin, you can add python using `devbox add python --disable_plugin` or in your `devbox.json`:

```json
{
"packages": {
"python": {
"version": "3.10",
"disable_plugin": true
}
}
}
20 changes: 19 additions & 1 deletion docs/app/docs/devbox_examples/languages/ruby.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,24 @@ GEM_HOME={PROJECT_DIR}/.devbox/virtenv/ruby
PATH={PROJECT_DIR}/.devbox/virtenv/ruby/bin:$PATH
```

### Disabling the Ruby Plugin

You can disable the Ruby plugin by running `devbox add ruby --disable-plugin`, or by setting the `disable_plugin` field in your `devbox.json`:

```json
{
"packages": {
"ruby": {
"version": "3.1",
"disable_plugin": true
},
"bundler": {
"version": "latest",
}
},
}
```

## Bundler

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

```dotenv
BUNDLE_BUILD__SASSC: "--disable-lto"
```
```
15 changes: 15 additions & 0 deletions docs/app/docs/devbox_examples/servers/apache.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,18 @@ HTTPD_CONFDIR={PROJECT_DIR}/devbox.d/apacheHttpd
### Notes

We recommend copying your `httpd.conf` file to a new directory and updating HTTPD_CONFDIR if you decide to modify it.

### Disabling the Apache Plugin

You can disable the Apache plugin by running `devbox add apache --disable-plugin`, or by setting the `disable_plugin` field in your `devbox.json`:

```json
{
"packages": {
"apache": {
"version": "latest",
"disable_plugin": true
}
}
}
```
15 changes: 15 additions & 0 deletions docs/app/docs/devbox_examples/servers/caddy.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,18 @@ Note that by default, Caddy is configured with `./devbox.d/web` as the root. To
### Notes

You can customize the config used by the caddy service by modifying the Caddyfile in devbox.d/caddy, or by changing the CADDY_CONFIG environment variable to point to a custom config. The custom config must be either JSON or Caddyfile format.

### Disabling the Caddy Plugin

You can disable the Caddy plugin by running `devbox add caddy --disable-plugin`, or by setting the `disable_plugin` field in your `devbox.json`:

```json
{
"packages": {
"caddy": {
"version": "latest",
"disable_plugin": true
}
},
}
```
15 changes: 15 additions & 0 deletions docs/app/docs/devbox_examples/servers/nginx.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,18 @@ To customize:
* Use $NGINX_GROUP to customize.

You can also customize the `nginx.conf` and `fastcgi.conf` stored in `devbox.d/nginx`

### Disabling the NGINX Plugin

You can disable the NGINX plugin by running `devbox add nginx --disable-plugin`, or by setting the `disable_plugin` field in your `devbox.json`:

```json
{
"packages": {
"nginx": {
"version": "latest",
"disable_plugin": true
}
}
}
```