Added check for interactive mode in tinybird-login service

This commit is contained in:
Chris Raible
2025-07-14 17:17:10 -07:00
committed by James Loh
parent e994f882b3
commit 62ff21363f
2 changed files with 9 additions and 1 deletions

View File

@@ -135,7 +135,7 @@ services:
profiles: [analytics]
networks:
- ghost_network
tty: true
tty: false
restart: no
tinybird-sync:

View File

@@ -19,5 +19,13 @@ then
exit 0
fi
# Check if running in interactive environment
## If not logged in and running in non-interactive mode (i.e. `docker compose up -d`), the tinybird-login service will hang indefinitely
if [[ ! -t 0 ]] || [[ ! -t 1 ]]; then
echo "Not logged in to Tinybird and running in non-interactive mode."
echo "Please run 'docker compose run --rm tinybird-login' to login interactively."
exit 1
fi
# Login to Tinybird
tb login --method code