sitecore / docker-tools Goto Github PK
View Code? Open in Web Editor NEWSitecore Docker Tools are utilities which assist Sitecore developers in initializing and running containerized Sitecore environments.
License: MIT License
Sitecore Docker Tools are utilities which assist Sitecore developers in initializing and running containerized Sitecore environments.
License: MIT License
As a developer, I'd like to use the module reading dotenv files and their values.
Currently the module only provides the ability to set values in a file. It would be nice if we could also read a value.
Get-EnvFileVariable -Variable "NODE_EXTRA_CA_CERTS" `
-Path "$PSScriptRoot\src\rendering\.env.local"
Hi, with a new sitecore release, should I continue using image sitecore-docker-tools-assets:10.2-1809
or these tools are available elsewhere or by other name?
I wasn't able to find image version with 10.3
tag in official registry reference
https://raw.githubusercontent.com/Sitecore/docker-images/master/tags/sitecore-tags.md
As a developer, I'd like to use the Set-DockerComposeEnvFileVariable
function for other dotenv files, like those used with Next.js, so that I can initialize values for developer environments.
Currently Set-DockerComposeEnvFileVariable
only allows files named .env
, and has a name that indicates it is only valuable for Docker Compose. Would like to use this function to initialize NODE_EXTRA_CA_CERTS
for Next.js as well, e.g.
Set-EnvFileVariable -Variable "NODE_EXTRA_CA_CERTS" `
-Value "$(& $mkcert -CAROOT)\rootCA.pem" `
-Path "$PSScriptRoot\src\rendering\.env.local"
If the function is renamed, the existing name should be retained as well as a pass-through for backward compatibility.
Local tests of https://github.com/watchexec/watchexec shows promising results as a possible replacement of https://github.com/Sitecore/docker-tools/blob/main/image/src/scripts/Watch-Directory.ps1#L185. The current loop uses 2-3% CPU when idle where watchexec uses 0.
Other observations while testing watchexec:
.gitignore
and supports excluding/including files/folder from parameters.We need to test this in a container to:
I get an error that the HedgehogDevelopment.SitecoreProject.PackageInstallPostProcessor.dll assembly can't be found when deploying my TDS wdp packages.
The module uses the Windows-specific function New-SelfSignedCertificate, plus some Windows delimiters in paths.
This makes it impossible to use on Linux ( e.g., on build agents).
"Get-EnvFileVariable" function fails default value of "-Path" is used.
As a developer, I'd like to configure my Sitecore environment in a way that's optimal for development, so that I can have a faster development environment and an easier debugging experience.
Allow configuration of development-specific Web.config transforms and App_Config patches in the development entrypoint. Docker Tools would provide some of the essentials, but developers could add others.
Transforms/patches would be organized into folders, and the folder names could be used to enable specific patches.
SITECORE_DEVELOPMENT_PATCHES=CustomErrorsOn,DebugOn,OptimizeCompilationsOn,InitializeLogsOff,DiagnosticsOff,RobotDetectionOff
It allows you to have a consistent image build for dev, test, and prod, and makes these development-only transforms transient.
configBuilders
?My POC with Section Handlers was only half-successful. It's possible for customErrors
but not compilation
, due to availability of the app domain during configuration load.
Seems cleaner this way, but open to input on this.
As a developer, I'd like to configure and customize startup activities in my development container, so that I can affect container content and behavior without impacting the delivered images.
Currently the development entrypoint includes the watch script, and soon development patch application. Rather than continue to build out this script monolithically, it would be good to have a central configuration file for the entrypoint, that allows specifying and configuring tasks.
Proposal from @pbering:
{
"tasks": [
{ "powershell": { "path": "C:\\tools\\transform.ps1", "args": "-Source 'C:\\sitecore-dev-patches\\Web.config.CustomErrorsOff.xdt' -Target 'C:\\inetpub\\wwwroot\\Web.config' " } },
{ "powershell": { "path": "C:\\tools\\transform.ps1", "args": "-Source 'C:\\sitecore-dev-patches\\Web.config.InitMessagesOff.xdt' -Target 'C:\\inetpub\\wwwroot\\Web.config' " } },
{ "powershell": { "path": "C:\\tools\\transform.ps1", "args": "-Source 'C:\\sitecore-dev-patches\\Web.config.OptimizeCompilationsOn.xdt' -Target 'C:\\inetpub\\wwwroot\\Web.config'" } },
{ "powershell": { "path": "C:\\tools\\transform.ps1", "args": "-Source 'C:\\inetpub\\wwwroot\\Web.config.MyCustomDevStuff.xdt' -Target 'C:\\inetpub\\wwwroot\\Web.config'" } },
{ "powershell": { "path": "C:\\tools\\sync.ps1", "args": "-Source 'C:\\src' -Target 'C:\\inetpub\\wwwroot' -Sleep '200'", "runAsJob": true } },
{ "powershell": { "path": "C:\\tools\\streamlogs.ps1", "args": "-IncludeIISLogs -IncludeSitecoreLogs -IncludeHttpSysLogs" } }
]
}
Or we could do something less verbose and more PowerShell-specific, similar to SIF:
{
"tasks": [
{
"script": "Watch-Directory",
"args": {
}
},
{
"script": "Development-Patches",
"args": {
"Include": [
"CustomErrorsOff",
"DebugOn",
"InitMessagesOff",
"DiagnosticsOff",
"RobotDetectionOff",
"OptimizeCompilationsOn",
"XdbOff"
]
}
}
]
}
Would it even be worth extracting the task runner pieces of SIF to do this? Or is there an existing PowerShell task runner we could use?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.