fabriquedoc/run_docker_compose.ps1

25 lines
806 B
PowerShell
Raw Permalink Normal View History

2024-12-31 22:00:07 +00:00
# PowerShell script (for Windows)
# Check if docker-compose is installed
if (!(Get-Command docker-compose -ErrorAction SilentlyContinue)) {
Write-Host "docker-compose could not be found. Please install it and try again."
exit 1
}
# Check if .env file exists
if (!(Test-Path .env)) {
Write-Host ".env file not found. Please create it and try again."
exit 1
}
# Check if docker-compose-local.yml file exists
if (!(Test-Path docker-compose-local.yml)) {
Write-Host "docker-compose-local.yml file not found. Please create it and try again."
exit 1
}
# Set a custom project name (which will be used for the network name)
$env:COMPOSE_PROJECT_NAME = "fabriquedoc"
# Run docker-compose with the local configuration
docker-compose -f docker-compose-local.yml --env-file .env up --build