31 lines
857 B
Bash
Executable File
31 lines
857 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
cd "$ROOT_DIR"
|
|
|
|
if [ ! -f .env ]; then
|
|
cp .env.example .env
|
|
echo "created .env from .env.example; edit credentials and rerun" >&2
|
|
exit 2
|
|
fi
|
|
|
|
scripts/merge-env-defaults.sh .env .env.example
|
|
|
|
COMPOSE=(docker compose --env-file .env -f docker-compose.infra.yml -f docker-compose.apps.yml)
|
|
|
|
"${COMPOSE[@]}" up -d mysql redis mongo nacos rocketmq-namesrv rocketmq-broker rocketmq-proxy
|
|
|
|
python3 scripts/import-nacos-configs.py
|
|
scripts/create-rocketmq-topics.sh
|
|
scripts/apply-mysql-baseline.sh
|
|
scripts/build-images.sh
|
|
|
|
"${COMPOSE[@]}" up -d auth wallet other live order console external golang gateway chatapp-cron admin caddy
|
|
|
|
echo
|
|
echo "testbox status:"
|
|
"${COMPOSE[@]}" ps
|
|
echo
|
|
echo "public url: ${TESTBOX_PUBLIC_BASE_URL:-https://jvapi-test.haiyihy.com}"
|