36 lines
1.4 KiB
Bash
Executable File
36 lines
1.4 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# used in ./ob/cmd/* scripts ran by ./launcher
|
|
. ./cmd/_colors
|
|
|
|
export docker_path=`which docker`
|
|
export git_path=`which git`
|
|
|
|
# https://docs.docker.com/compose/environment-variables/envvars/
|
|
# export COMPOSE_PROJECT_NAME="ob_alpha"
|
|
export DOCKER_RESTART_POLICY=yes
|
|
export COMPOSE_ENV_FILES="$(pwd)/.env.alpha"
|
|
export COMPOSE_FILE="$(pwd)/alpha-compose.yml"
|
|
export OB_COMPOSE_OVERRIDE="$(pwd)/alpha-compose.override.yml"
|
|
|
|
ob_compose() {
|
|
$docker_path-compose -f $COMPOSE_FILE -f $OB_COMPOSE_OVERRIDE "$@"
|
|
}
|
|
|
|
|
|
# Colored logs...
|
|
function heading() { printf "$(c B1)[OSINTBuddy: $OB_CMD] ${WHITE}${1}${reset}\n"; }
|
|
function warning() { printf "${BLUE}[OSINTBuddy: $OB_CMD] ${magenta}${1}${reset}\n"; }
|
|
function error() { printf "${BLUE}[OSINTBuddy: $OB_CMD] ${red}${1}${reset}\n"; }
|
|
function success() { printf "${BLUE}[OSINTBuddy: $OB_CMD] ${green}${1:-Completed successfully!}${reset}\n"; }
|
|
function info() { printf "${BLUE}[OSINTBuddy: $OB_CMD] ${CYAN}${1:-''}${reset}\n"; }
|
|
function abort() { printf "${BLUE}[OSINTBuddy: $OB_CMD] ${RED}${1:-Aborting!}${reset}\n\n"; exit 1; }
|
|
|
|
|
|
function print_access_urls() {
|
|
info "Once ready you can access OSINTBuddy through the following URLs:"
|
|
info " http://localhost:3000 - frontend"
|
|
info " http://localhost:45910 - casdoor"
|
|
info " http://localhost:48997/docs - docs"
|
|
info " http://localhost:48997/api - backend"
|
|
}
|