Skip to content

Instantly share code, notes, and snippets.

@isaqueprofeta
Created October 25, 2017 16:14
Show Gist options
  • Save isaqueprofeta/13d962670c86c0660164173c50705ba4 to your computer and use it in GitHub Desktop.
Save isaqueprofeta/13d962670c86c0660164173c50705ba4 to your computer and use it in GitHub Desktop.
My start script for customized laradock showing IP's
#!/bin/bash
if [ $# -lt 1 ]
then
echo "Uso : $0 Stack a ser usado (zabbix/webdev)"
exit
fi
case "$1" in
zabbix) echo "Iniciando Docker-Zabbix..."
docker-compose up -d zabbix-db zabbix-server zabbix-frontend zabbix-agentd
docker inspect --format='{{.Name}} ===== {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $(docker-compose ps -q)
;;
webdev) echo "Iniciando PostgreSQL e Nginx..."
docker-compose up -d postgres redis nginx
docker inspect --format='{{.Name}} ===== {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $(docker-compose ps -q)
;;
*) echo "Lista dos Stacks já iniciados:"
docker inspect --format='{{.Name}} ===== {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $(docker-compose ps -q)
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment