thread-master/infra/start-infra.sh

13 lines
324 B
Bash
Raw Normal View History

2026-06-30 07:09:44 +00:00
#!/usr/bin/env bash
# Mongo + Redisdocker compose
set -euo pipefail
ROOT="$(cd "$(dirname "$0")" && pwd)"
ENV_FILE="$ROOT/.env"
if [[ ! -f "$ENV_FILE" ]]; then
echo "找不到 $ENV_FILE請先cp .env.example .env" >&2
exit 1
fi
exec docker compose -f "$ROOT/docker-compose.yml" --env-file "$ENV_FILE" up -d