You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update docs to use versions + Global commands (#1068)
## Summary
- [x] Update Docs to show latest Global commands in CLI Reference
- [x] Update examples to use versions
- [x] Add Template Docs
- [x] Document Autolatest
## How was it tested?
Localhost
Initialize a directory as a devbox project using a template
4
+
5
+
## Synopsis
6
+
7
+
Initialize a directory as a devbox project. This will create an empty devbox.json in the current directory. You can then add packages using `devbox add`
Starts a new shell and runs your script or command in it, exiting when done.
4
+
5
+
The script must be defined in `devbox.json`, or else it will be interpreted as an arbitrary command. You can pass arguments to your script or command. Everything after `--` will be passed verbatim into your command (see example)
6
+
7
+
```bash
8
+
devbox global run <pkg>... [flags]
9
+
```
10
+
11
+
## Examples
12
+
13
+
Run a command directly:
14
+
15
+
```bash
16
+
devbox add cowsay
17
+
devbox global run cowsay hello
18
+
devbox global run -- cowsay -d hello
19
+
```
20
+
21
+
Run a script (defined as `"moo": "cowsay moo"`) in your devbox.json:
22
+
23
+
```bash
24
+
devbox global run moo
25
+
```
26
+
27
+
## Options
28
+
29
+
<!-- Markdown Table of Options -->
30
+
| Option | Description |
31
+
| --- | --- |
32
+
|`-h, --help`| help for global run |
33
+
|`-q, --quiet`| suppresses logs |
34
+
35
+
## SEE ALSO
36
+
37
+
*[devbox global](devbox_global.md) - Manages global Devbox packages
Interact with Devbox services for your global packages. This command replicates the subcommands for [devbox services](devbox_services.md) but for your global packages.
4
+
5
+
```bash
6
+
devbox global services [command]
7
+
```
8
+
9
+
## Options
10
+
11
+
<!-- Markdown Table of Options -->
12
+
| Option | Description |
13
+
| --- | --- |
14
+
|`-h, --help`| help for global services |
15
+
|`-q, --quiet`| suppresses logs |
16
+
17
+
## SEE ALSO
18
+
19
+
*[devbox global](devbox_global.md) - Manages global Devbox packages
Updates packages in your Devbox global config to the latest available version.
4
+
5
+
## Synopsis
6
+
7
+
If you provide this command with a list of packages, it will update those packages to the latest available version based on the version tag provided.
8
+
9
+
For example: if your global config has `[email protected]` in your package list, running `devbox update` will update to the latest patch version of `python 3.11`.
10
+
11
+
If no packages are provided, this command will update all the versioned packages to the latest acceptable version.
12
+
13
+
```bash
14
+
devbox update [pkg]... [flags]
15
+
```
16
+
17
+
## Options
18
+
19
+
<!-- Markdown Table of Options -->
20
+
| Option | Description |
21
+
| --- | --- |
22
+
|`-h, --help`| help for update |
23
+
|`-q, --quiet`| suppresses logs |
24
+
25
+
## SEE ALSO
26
+
27
+
*[devbox global](devbox_global.md) - Manages global Devbox packages
To use a local MariaDB for development with Devbox and Nix, you will need to configure MariaDB to install and manage the configuration locally. This can be done using Environment variables to create the data directory, pidfile, and unix sock locally.
4
+
MariaDB can be automatically configured for your dev environment by Devbox via the built-in MariaDB Plugin. This plugin will activate automatically when you install MariaDB using `devbox add mariadb`, or when you use a versioned Nix package like `devbox add mariadb_1010`
@@ -13,47 +13,50 @@ To use a local MariaDB for development with Devbox and Nix, you will need to con
13
13
14
14
```json
15
15
"packages": [
16
-
"mariadb"
16
+
"mariadb@latest"
17
17
]
18
18
```
19
19
20
-
## Environment Variables
20
+
You can manually add the MariaDB Plugin to your `devbox.json` by adding it to your `includes` list:
21
21
22
-
This script should be sourced in the `init_hook` of our devbox.json. This sets environment variables needed to configure and start MariaDB, as well as setting the data directory to a local folder.
23
-
24
-
```bash
25
-
# Environment variables for running MariaDB with local configuration
26
-
export MYSQL_BASEDIR=$(which mariadb | sed -r "s/\/bin\/mariadb//g")
27
-
export MYSQL_HOME=$PWD/conf/mysql # or another folder in your project directory
28
-
# Store DB data in a local folder
29
-
export MYSQL_DATADIR=$MYSQL_HOME/data
30
-
# Keep the socket and pidfile in our conf folder, and out of the Nix Store
31
-
export MYSQL_UNIX_PORT=$MYSQL_HOME/mysql.sock
32
-
export MYSQL_PID_FILE=$MYSQL_HOME/mysql.pid
22
+
```json
23
+
"includes": [
24
+
"plugin:mariadb"
25
+
]
33
26
```
34
27
35
-
## Installing the Database
36
-
We can check if the MySQL data directory exists, and if not install the database using the environment variables we configured:
28
+
## MariaDB Plugin Support
29
+
30
+
Devbox will automatically create the following configuration when you run `devbox add mariadb`. You can view the full configuration by running `devbox info mariadb`
The plugin will also create the following helper files in your project's `.devbox/virtenv` folder:
51
+
52
+
* mariadb/flake.nix
53
+
* mariadb/setup_db.sh
54
+
* mariadb/process-compose.yaml
55
+
56
+
These files are used to setup your database and service, and should not be modified
57
+
58
+
### Notes
59
+
60
+
* This plugin wraps mysqld and mysql_install_db to work in your local project. For more information, see the `flake.nix` created in your `.devbox/virtenv/mariadb` folder.
61
+
* This plugin will create a new database for your project in MYSQL_DATADIR if one doesn't exist on shell init.
62
+
* You can use `mysqld` to manually start the server, and `mysqladmin -u root shutdown` to manually stop it
Copy file name to clipboardExpand all lines: docs/app/docs/devbox_examples/databases/redis.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,10 +14,12 @@ Redis can be configured automatically using Devbox's built in Redis plugin. This
14
14
15
15
```json
16
16
"packages": [
17
-
"redis"
17
+
"redis@latest "
18
18
],
19
19
```
20
20
21
+
This will install the latest version of Redis. You can find other installable versions of Redis by running `devbox search redis`.
22
+
21
23
## Redis Plugin Details
22
24
23
25
The Redis plugin will automatically create the following configuration when you install Redis with `devbox add`
@@ -48,4 +50,4 @@ Running `devbox services start redis` will start redis as a daemon in the backgr
48
50
49
51
You can manually start Redis in the foreground by running `redis-server $REDIS_CONF --port $REDIS_PORT`.
50
52
51
-
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`
53
+
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`
Copy file name to clipboardExpand all lines: docs/app/docs/devbox_examples/languages/csharp.md
+3-9Lines changed: 3 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,17 +14,11 @@ C# and .NET projects can be easily generated in Devbox by adding the dotnet SDK
14
14
15
15
```json
16
16
"packages": [
17
-
"dotnet-sdk"
17
+
"dotnet-sdk@latest"
18
18
],
19
19
```
20
-
This will install .NET SDK 6.0
21
-
22
-
Other versions available include:
23
-
24
-
* dotnet-sdk_7 (version 7.0)
25
-
* dotnet-sdk_5 (version 5.0)
26
-
* dotnet-sdk_3 (version 3.1)
20
+
This will install the latest version of the dotnet SDK. You can find other installable versions of the dotnet SDK by running `devbox search dotnet-sdk`.
0 commit comments