thread-master/infra/start-infra.sh

13 lines
324 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/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