mirror of
https://github.com/bitwarden/server.git
synced 2025-07-02 00:22:50 -05:00
Create missing container volume directories if/when docker-compose fails to
This commit is contained in:
@ -76,6 +76,7 @@ function Install() {
|
||||
|
||||
function Docker-Compose-Up {
|
||||
Docker-Compose-Files
|
||||
Docker-Compose-Volumes
|
||||
Invoke-Expression ("docker-compose up -d{0}" -f $quietPullFlag)
|
||||
}
|
||||
|
||||
@ -99,6 +100,30 @@ function Docker-Compose-Files {
|
||||
$env:COMPOSE_HTTP_TIMEOUT = "300"
|
||||
}
|
||||
|
||||
function Docker-Compose-Volumes {
|
||||
Create-Dir "core"
|
||||
Create-Dir "core/attachments"
|
||||
Create-Dir "logs"
|
||||
Create-Dir "logs/admin"
|
||||
Create-Dir "logs/api"
|
||||
Create-Dir "logs/events"
|
||||
Create-Dir "logs/icons"
|
||||
Create-Dir "logs/identity"
|
||||
Create-Dir "logs/mssql"
|
||||
Create-Dir "logs/nginx"
|
||||
Create-Dir "logs/notifications"
|
||||
Create-Dir "mssql/backups"
|
||||
Create-Dir "mssql/data"
|
||||
}
|
||||
|
||||
function Create-Dir($str) {
|
||||
$outPath = "${outputDir}/$str"
|
||||
if (!(Test-Path -Path $outPath )) {
|
||||
Write-Line "Creating directory $outPath"
|
||||
New-Item -ItemType directory -Path $outPath | Out-Null
|
||||
}
|
||||
}
|
||||
|
||||
function Docker-Prune {
|
||||
docker image prune --all --force --filter="label=com.bitwarden.product=bitwarden" `
|
||||
--filter="label!=com.bitwarden.project=setup"
|
||||
|
Reference in New Issue
Block a user