diff --git a/compose.yml b/compose.yml index 0ebc9c0..35bd2f5 100644 --- a/compose.yml +++ b/compose.yml @@ -135,7 +135,7 @@ services: profiles: [analytics] networks: - ghost_network - tty: true + tty: false restart: no tinybird-sync: diff --git a/tinybird/handleLogin.sh b/tinybird/handleLogin.sh index 087ed39..6b97aac 100755 --- a/tinybird/handleLogin.sh +++ b/tinybird/handleLogin.sh @@ -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