feat: add new folder
This commit is contained in:
16
gig-poc/infrastructure/scripts/dev-up.sh
Executable file
16
gig-poc/infrastructure/scripts/dev-up.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env sh
|
||||
set -eu
|
||||
|
||||
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname "$0")" && pwd)
|
||||
INFRA_DIR=$(CDPATH= cd -- "$SCRIPT_DIR/.." && pwd)
|
||||
|
||||
cd "$INFRA_DIR"
|
||||
docker compose -f docker-compose.yml up --build -d
|
||||
echo "等待 API 健康检查..."
|
||||
until curl -fsS http://127.0.0.1:8000/health >/dev/null 2>&1; do
|
||||
sleep 3
|
||||
done
|
||||
until curl -fsS -X POST http://127.0.0.1:8000/poc/ingest/bootstrap >/dev/null 2>&1; do
|
||||
sleep 3
|
||||
done
|
||||
echo "本地环境已启动。Web: http://127.0.0.1:5173 API: http://127.0.0.1:8000/docs"
|
||||
8
gig-poc/infrastructure/scripts/down.sh
Executable file
8
gig-poc/infrastructure/scripts/down.sh
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env sh
|
||||
set -eu
|
||||
|
||||
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname "$0")" && pwd)
|
||||
INFRA_DIR=$(CDPATH= cd -- "$SCRIPT_DIR/.." && pwd)
|
||||
|
||||
cd "$INFRA_DIR"
|
||||
docker compose -f docker-compose.yml down
|
||||
9
gig-poc/infrastructure/scripts/prod-up.sh
Executable file
9
gig-poc/infrastructure/scripts/prod-up.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env sh
|
||||
set -eu
|
||||
|
||||
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname "$0")" && pwd)
|
||||
INFRA_DIR=$(CDPATH= cd -- "$SCRIPT_DIR/.." && pwd)
|
||||
|
||||
cd "$INFRA_DIR"
|
||||
docker compose -f docker-compose.prod.yml up --build -d
|
||||
echo "生产部署容器已启动。请按实际域名或端口访问 Web。"
|
||||
Reference in New Issue
Block a user