From e2fb04dedbd6e0bbd3938b02a60f46ab1987a51b Mon Sep 17 00:00:00 2001 From: Janosch <99879757+jkppr@users.noreply.github.com> Date: Tue, 7 Jan 2025 11:41:54 +0100 Subject: [PATCH] Add postgres connection to utils/tsdev.sh --- utils/tsdev.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/utils/tsdev.sh b/utils/tsdev.sh index 138ea7c80e..05b0a00364 100755 --- a/utils/tsdev.sh +++ b/utils/tsdev.sh @@ -21,6 +21,7 @@ help(){ echo " vue-install-deps Install vue frontend dependencies. Default: 'frontend-ng'" echo " vue-test Test the vue frontend. Default: 'frontend-ng'" echo " web Start the web frontend bound to port 5000" + echo " postgres Connect to the Timesketch postgres database." echo echo "Frontend:" echo " frontend The old v1 frontend (deprecated)." @@ -94,6 +95,9 @@ case "$1" in web) $s docker exec --interactive --tty $CONTAINER_ID gunicorn --reload --bind 0.0.0.0:5000 --log-level debug --capture-output --timeout 600 timesketch.wsgi:application ;; + postgres) + $s docker exec --interactive --tty postgres bash -c "psql -U timesketch -d timesketch" + ;; *) echo \""$1"\" is not a valid command.; help esac