Introducing Packages
Major Overhaul with Breaking Changes split into packaged, default behavior moved into 'base' package each package has a json package description file with criteria for loading Modified Setup-Profile to refer to 'base' package path for auto loading moved Linux aliases and command to 'base.linux' package created 'docker' package to address docker supported systems modified Get-MyScripts, Edit-MyScripts and Reload-MyScripts accordingly. Dropped -System and sys.*, package json conditions will take care of it. Supplied command to create/edit package json files: - New-MyPackage - Add-PackageCondition - Set-MyPackage
This commit is contained in:
parent
80a488484b
commit
42b39f4e25
83 changed files with 505 additions and 130 deletions
28
docker/dcup.ps1
Normal file
28
docker/dcup.ps1
Normal file
|
@ -0,0 +1,28 @@
|
|||
[CmdletBinding(SupportsShouldProcess)]param(
|
||||
[ArgumentCompleter({ param (
|
||||
$commandName,
|
||||
$parameterName,
|
||||
$wordToComplete,
|
||||
$commandAst,
|
||||
$fakeBoundParameters
|
||||
)
|
||||
[DockerComposeDirs]::_GetValidValues($wordToComplete,$true)
|
||||
})]
|
||||
[string[]]$ProjectPath=@($PWD),
|
||||
[Parameter(Position = 0, ValueFromRemainingArguments = $true)]
|
||||
[string[]]$CliParams
|
||||
)
|
||||
|
||||
$local:dcParams = [string]::Empty
|
||||
if( $CliParams ) {
|
||||
$dcParams = $CliParams | ForEach-Object {
|
||||
if( $_ -match "(?:^'[^']+'$)|(?:^`"[^`"]+`"$)|(?:^[^\s]+$)" ) { $_ }
|
||||
else { "'$($_.Replace( "'", "''" ))'" }
|
||||
}
|
||||
}
|
||||
$ProjectPath | ForEach-Object {
|
||||
$local:dcPath = $(Resolve-Path $(Join-Path $_ docker-compose.yml))
|
||||
Write-Verbose "docker-compose --file $dcPath up -d --remove-orphans $dcParams && docker-compose --file $dcPath logs --follow --tail 10 $dcParams"
|
||||
docker-compose --file $dcPath up -d --remove-orphans $dcParams && docker-compose --file $dcPath logs --follow --tail 10 $dcParams
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue