Repository navigation
Bundles
A bundle is your migrations project published as a self-contained, single-file executable, so it runs where there's no .NET installed: deploy agents, minimal containers, jump boxes.
$ migrate-mongo bundle -r linux-x64 -o out
Created out/MyApp.Migrations (linux-x64, 78.3 MB) and out/migrate-mongo.yaml
| Option | Meaning |
|---|---|
-r, --runtime
|
Runtime identifier, e.g. linux-x64, linux-musl-x64 (Alpine), win-x64, osx-arm64. Defaults to the current machine's. Any platform can be built from any OS. |
-o, --output
|
Output directory (default bundle). |
The bundle is named after the project, and migrate-mongo.yaml is copied next to it. When the bundle is for the current
platform, bundle checks it starts.
$ ./out/MyApp.Migrations up --env staging
- It takes the same commands, options and exit codes as the tool, apart from the
tool-only ones (
init,create,bundle,version,--no-buildand--runner). - It looks for its config in the current directory and then next to itself, or use
-f <path>. - Environment variables in the config are read from the environment it runs in.
A bundle can't open an SSH tunnel on its own. Either:
-
add
Kevsoft.MigrateMongo.Tunnelto the project so the bundle opens them itself; or -
drive the bundle with the standalone tool, which opens the tunnel and also gives you the tool's output:
migrate-mongo up --env prod --runner ./out/MyApp.Migrations
The -bundle Docker image is the tool without .NET, for exactly this.
Kevsoft.MigrateMongo ·
NuGet ·
Releases ·
Issues ·
Found a mistake? These pages live in
wiki/ on main; pull requests welcome.
Get started
Migrations
- Writing Migrations
- Transactions
- Recording Results
- Dependency Injection
- Custom Templates
- Adopting an Existing Database
Collections
- Managing Collections
- Indexes
- Search Indexes
- Collection Options
- Validators
- Views
- Undeclared Collections
Deploying
Connecting
Reference
Concepts