Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hardyoyo/b3984ae27fd81099eba6f508c195fc68 to your computer and use it in GitHub Desktop.
Save hardyoyo/b3984ae27fd81099eba6f508c195fc68 to your computer and use it in GitHub Desktop.
# Bash function to have Docker-Compose send a notification upon completion, because it can take a while
# "cheers" -> https://bigsoundbank.com/sound-0237-shouts-and-applauses-of-teens-2.html
# only works on a Mac, you'd have to revise it for other operating systems
docker-compose() {
local cmd="docker-compose $@"
command $cmd && osascript -e 'display notification "$cmd" with title "Docker-Compose Done" sound name "cheers"'
}
@hardyoyo
Copy link
Author

hardyoyo commented Nov 9, 2023

You park this in a Bash config file, near where you have your aliases. It works just like an alias, and sends a notification when the docker-compose command completes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment