forked from JavaScriptSolidServer/JavaScriptSolidServer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart-docker.ps1
More file actions
30 lines (26 loc) · 962 Bytes
/
Copy pathstart-docker.ps1
File metadata and controls
30 lines (26 loc) · 962 Bytes
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
param(
[int]$ExternalPort = 3000,
[int]$InternalPort = 3000,
[string]$RepoUrl = "https://github.com/JavaScriptSolidServer/JavaScriptSolidServer.git",
[switch]$Https,
[string]$CertsDir = "./docker/certs",
[string]$SslKeyPath = "/certs/privkey.pem",
[string]$SslCertPath = "/certs/fullchain.pem"
)
$env:JSS_EXTERNAL_PORT = "$ExternalPort"
$env:JSS_INTERNAL_PORT = "$InternalPort"
$env:JSS_REPO_URL = $RepoUrl
$env:JSS_CERTS_DIR = $CertsDir
$env:JSS_SSL = if ($Https.IsPresent) { "true" } else { "false" }
$env:JSS_SSL_KEY_PATH = $SslKeyPath
$env:JSS_SSL_CERT_PATH = $SslCertPath
New-Item -ItemType Directory -Force -Path "./docker/jss" | Out-Null
docker compose up -d --build
Write-Host ""
Write-Host "JavaScriptSolidServer is starting..."
if ($Https.IsPresent) {
Write-Host "URL: https://localhost:$ExternalPort/"
} else {
Write-Host "URL: http://localhost:$ExternalPort/"
}
Write-Host "Data dir: ./docker/jss"