mirror of
https://github.com/openfaas/faas.git
synced 2025-06-08 16:26:47 +00:00
Add PowerShell script to start Docker stack
This commit adds a PowerShell script that mirrors the existing `deploy_stack.*` scripts. It also checks that docker is installed and returns a readable error if not found (the alternative is a rather cryptic PowerShell error). The docker stack command itself returns a readable error if no swarm has been initialised. Signed-off-by: John McCabe <john@johnmccabe.net>
This commit is contained in:
parent
2de58fe7f1
commit
a18c2e109a
11
deploy_stack.ps1
Normal file
11
deploy_stack.ps1
Normal file
@ -0,0 +1,11 @@
|
||||
#!ps1
|
||||
|
||||
if (Get-Command docker -errorAction SilentlyContinue)
|
||||
{
|
||||
Write-Host "Deploying stack"
|
||||
docker stack deploy func --compose-file ./docker-compose.yml
|
||||
}
|
||||
else
|
||||
{
|
||||
Write-Host "Unable to find docker command, please install Docker (https://www.docker.com/) and retry"
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user