forked from hydro-dev/Hydro
-
Notifications
You must be signed in to change notification settings - Fork 2
/
compose.ps1
28 lines (26 loc) · 1.02 KB
/
compose.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
$type = $args[0]
switch ($type) {
"test" {
if ($args[1] -ne "--skip" -and $args[1] -ne "-s") {
yarn build:ui:production;
}
docker compose -f ./docker/docker-compose-test.yml -p hydro-test up -d --build;
}
"dev" {
docker compose -f ./docker/docker-compose-dev.yml -p hydro-dev up -d --build;
$opt = $args[1]
if ($opt -eq "--init") {
npx hydrooj cli system set file.endPoint http://localhost:9000/;
npx hydrooj cli system set file.accessKey "minioadmin";
npx hydrooj cli system set file.secretKey "minioadmin";
npx hydrooj cli system set hydro-elastic.host localhost;
npx hydrooj cli user create [email protected] root rootroot 2;
npx hydrooj cli user setSuperAdmin 2;
npx hydrooj cli user create [email protected] judger judgerjudger 3;
npx hydrooj cli user setJudge 3;
}
}
Default {
Write-Output "Invaild argument!"
}
}