-
-
Save nul800sebastiaan/1553316fda85011270ce2bde35243e5b to your computer and use it in GitHub Desktop.
dotnet new umbraco -n UmbracoUnattended --connection-string "Server=GORDON\SQLExpress;Database=UmbracoUnattended;User Id=sa;Password=abc123;" | |
cd UmbracoUnattended | |
Set-Item Env:\UMBRACO__CMS__GLOBAL__INSTALLMISSINGDATABASE true | |
Set-Item Env:\UMBRACO__CMS__UNATTENDED__INSTALLUNATTENDED true | |
Set-Item Env:\UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERNAME "Test" | |
Set-Item Env:\UMBRACO__CMS__UNATTENDED__UNATTENDEDUSEREMAIL "[email protected]" | |
Set-Item Env:\UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD "test123456" | |
dotnet add package Umbraco.TheStarterKit | |
dotnet run |
Thanks for sharing, great way to install Umbraco, found a snippet from @ronaldbarendse on Discord als well to use local DB instead of a SQL Server Instance. The two combined wil really speed up creating test sites for me, so both #h5yr
dotnet new umbraco -n UmbracoUnattended --connection-string "Server=(localdb)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\Umbraco.mdf;Integrated Security=true"
cd UmbracoUnattended
Set-Item Env:\UMBRACO__CMS__GLOBAL__INSTALLMISSINGDATABASE true
Set-Item Env:\UMBRACO__CMS__UNATTENDED__INSTALLUNATTENDED true
Set-Item Env:\UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERNAME "Test"
Set-Item Env:\UMBRACO__CMS__UNATTENDED__UNATTENDEDUSEREMAIL "[email protected]"
Set-Item Env:\UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD "test123456"
dotnet add package Umbraco.TheStarterKit
dotnet run
The reason we're setting env variables here is that we don't want the default credentials to end up in
appsettings.Development.json
- that one would be committed to git and available forever.These variables get cleared when you restart Powershell, so they only count for 1 session.