-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-appia-web_pc.ps1
56 lines (45 loc) · 1.59 KB
/
install-appia-web_pc.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
if (!(Get-Command docker -errorAction SilentlyContinue))
{
Write-Host "You must install docker: https://www.docker.com/products/docker-desktop/"
exit 1
}
Write-Host "Downloading files from github"
Move-Item docker-compose.yml old-docker-compose.yml -errorAction SilentlyContinue
Move-Item local.ini old-local-ini -errorAction SilentlyContinue
Invoke-WebRequest https://raw.githubusercontent.com/PlethoraChutney/Appia/main/docker-compose.yml -OutFile docker-compose.yml
Invoke-WebRequest https://raw.githubusercontent.com/PlethoraChutney/Appia/main/local.ini -OutFile local.ini
if (Test-Path .\launch-appia.ps1)
{
Write-Host Detected old launch-appia.ps1 script.
.\launch-appia.ps1 nolaunch
}
if (!(Test-Path env:COUCHDB_USER))
{
$env:COUCHDB_USER = Read-Host "What would you like your CouchDB username to be?"
}
if (!(Test-Path env:COUCHDB_PASSWORD))
{
$env:COUCHDB_PASSWORD = Read-Host "What would you like your CouchDB password to be?"
}
# here we assume that all windows machines will be x86_64...
$env:APPIA_ARCH = ""
@"
if (!(docker stats --no-stream 2>`$null))
{
Write-Host Launching docker...
Start-Process "C:\Program Files\Docker\Docker\Docker Desktop.exe"
while (!(docker stats --no-stream 2>`$null))
{
Write-Host Waiting for docker to start...
Start-Sleep -Seconds 1
}
}
`$env:COUCHDB_USER = '$env:COUCHDB_USER'
`$env:COUCHDB_PASSWORD = '$env:COUCHDB_PASSWORD'
`$env:APPIA_ARCH = '$env:APPIA_ARCH'
if (`$args.Count -eq 0)
{
docker-compose up -d
}
"@ > launch-appia.ps1
Write-Host All set! You can launch Appia Web by running .\launch-appia.ps1