Repository navigation
Docker
ghcr.io/kevbite/migrate-mongo runs the tool without installing anything but Docker. Images are linux/amd64 and
linux/arm64, tagged with the version (0.2.0, 0.2) and latest. Pin a version in real pipelines.
| Image | Contains | Use it to |
|---|---|---|
ghcr.io/kevbite/migrate-mongo:<version> |
The tool on the .NET 11 SDK. | Build and run your migrations project, like the installed tool. A global.json that pins an older SDK won't work in it. |
ghcr.io/kevbite/migrate-mongo:<version>-bundle |
The tool without .NET. | Run bundles with --runner. It can't build a project, so without --runner it stops and asks for one. |
The working directory is /src, so mount your repository there. Pass connection variables with -e.
Run it as your user so build output in the mount isn't owned by root:
docker run --rm -v "$PWD:/src" --user "$(id -u):$(id -g)" -e HOME=/tmp \
-e PROD_MONGODB_URL ghcr.io/kevbite/migrate-mongo:0.2.0 up --env proddocker run --rm -v "$PWD:/src" -e PROD_MONGODB_URL \
ghcr.io/kevbite/migrate-mongo:0.2.0-bundle up --env prod --runner ./out/MyApp.MigrationsThe bundle must be built for Linux (-r linux-x64 or -r linux-arm64).
Inside a container, localhost is the container itself. Use host.docker.internal (Docker Desktop), or
--network host on Linux.
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