Webwonders.Umbraco.DockerConfiguration
2.0.0
See the version list below for details.
dotnet add package Webwonders.Umbraco.DockerConfiguration --version 2.0.0
NuGet\Install-Package Webwonders.Umbraco.DockerConfiguration -Version 2.0.0
<PackageReference Include="Webwonders.Umbraco.DockerConfiguration" Version="2.0.0" />
paket add Webwonders.Umbraco.DockerConfiguration --version 2.0.0
#r "nuget: Webwonders.Umbraco.DockerConfiguration, 2.0.0"
// Install Webwonders.Umbraco.DockerConfiguration as a Cake Addin #addin nuget:?package=Webwonders.Umbraco.DockerConfiguration&version=2.0.0 // Install Webwonders.Umbraco.DockerConfiguration as a Cake Tool #tool nuget:?package=Webwonders.Umbraco.DockerConfiguration&version=2.0.0
Webwonders.Umbraco.DockerConfiguration
Webwonders.Umbraco.DockerConfiguration
is a lightweight NuGet package that automatically configures a Docker-based SQL Server for Umbraco 13+. This package requires no changes to your Program.cs
. This package is only intended for local development scenarios, where you need a cross-platform way to spin up a SQL Server instance inside Docker.
Features
- Zero Touch: No modifications needed in
Program.cs
or any Umbraco composer. - Docker Validation: Checks if Docker is installed and running.
- Docker Compose Generation: Creates a
docker-compose.yml
for SQL Server on demand. - Automatic Connection String: Dynamically configures Umbraco’s database connection for local development.
Installation
Install the package via NuGet:
Install-Package Webwonders.Umbraco.DockerConfiguration
Or the .NET CLI:
dotnet add package Webwonders.Umbraco.DockerConfiguration
That’s it! This package automatically configures everything for local Docker usage.
Configuration
To enable a local Docker-based SQL Server, set the following environment variables in your development environment. Typically, you can place these in launchSettings.json
(used only in local dev). Example:
{
"profiles": {
"UmbracoProject": {
"commandName": "Project",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"Use_Local_Docker_SQL": "true",
"Local_Docker_DB_NAME": "YourDatabaseName",
"Local_Docker_PASSWORD": "YourStrongPassword123",
"Local_Docker_PORT": "1433"
}
}
}
}
Environment Variables
Use_Local_Docker_SQL
Set to "true" to enable local Docker-based SQL; "false" (or unset) to disable.Local_Docker_DB_NAME
Name of the SQL Server database to create in Docker.Local_Docker_PASSWORD
Password for thesa
user.Local_Docker_PORT
Host port mapping for the SQL Server container.
Note: This package is intended for local development scenarios.
How It Works
- IHostingStartup Discovery
ASP.NET Core automatically discovers this package’s startup logic, so no code changes are required inProgram.cs
. - Docker Validation
Checks if Docker is installed and running locally. - Docker Compose
If enabled (Use_Local_Docker_SQL=true
), creates and runs a SQL Server container via Docker Compose. - Connection String Setup
Injects the correct connection string into Umbraco’s configuration, ready for local development.
Contributing
Contributions are welcome! Submit a pull request or open an issue on GitHub.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
-
net8.0
- Microsoft.AspNetCore.Hosting.Abstractions (>= 2.3.0)
- Microsoft.Extensions.Configuration (>= 9.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.