Files

36 lines
1.5 KiB
Bash
Executable File

#!/usr/bin/env bash
[[ ! ${WARDEN_DIR} ]] && >&2 echo -e "\033[31mThis script is not intended to be run directly!\033[0m" && exit 1
WARDEN_HEADER='
_ __ __
| | / /___ __________/ /__ ____
| | /| / / __ `/ ___/ __ / _ \/ __ \
| |/ |/ / /_/ / / / /_/ / __/ / / /
|__/|__/\__,_/_/ \__,_/\___/_/ /_/
'
WARDEN_USAGE=$(cat <<EOF
${WARDEN_HEADER:1}
Warden version $(cat ${WARDEN_DIR}/version)
\033[33mUsage:\033[0m
command [options] [arguments]
\033[33mOptions:\033[0m
-h, --help Display this help menu
\033[33mCommands:\033[0m
svc Orchestrates global services such as traefik, portainer and dnsmasq via docker compose
env-init Configure environment by adding '.env' file to the current working directory
env Controls an environment from any point within the root project directory
db Interacts with the db service on an environment (see 'warden db -h' for details)
redis Interacts with the redis service on an environment (see 'warden redis -h' for details)
install Initializes or updates warden configuration on host machine
shell Launches into a shell within the current project environment
status Display list of all running Warden project environments
debug Launches debug enabled shell within current project environment
sign-certificate Signs a wildcard certificate including all passed hostnames on the SAN list
version Show version information
EOF
)