#!/bin/bash # Check if we are in the right place if [ ! -d ./services ]; then echo "You must run this command from the project's root folder." exit 1 fi if [[ $# -eq 0 ]] ; then echo "Please tell me which service to get logs from." exit 1 fi if [[ "x$2" != "x" ]] ; then tail -f -n 1000 data/$1/log/$2.log else docker-compose logs -f $1 fi