setup.sh dorobił się flagi --status, i wyświetla status po uruchomieniu całej machinerii
parent
9fdfbb618b
commit
c048fa5a38
26
setup.sh
26
setup.sh
|
@ -141,6 +141,8 @@ cnt_pgadmin="$prefix-pgadmin"
|
|||
# cron
|
||||
cnt_cron="$prefix-cron"
|
||||
|
||||
# wszystkie
|
||||
cnt_all="$cnt_postgres $cnt_nginx_public $cnt_nginx_internal $cnt_phpfpm_frontend $cnt_phpfpm_rest $cnt_pgadmin $cnt_phpfpm_ldapadmin $cnt_cron"
|
||||
|
||||
#
|
||||
# stopujemy (w tym zawsze przy domyslnej akcji)
|
||||
|
@ -148,9 +150,9 @@ cnt_cron="$prefix-cron"
|
|||
|
||||
if [[ "$mode" == "" || "$mode" == "--stop" ]]; then
|
||||
|
||||
docker stop $cnt_postgres $cnt_nginx_public $cnt_nginx_internal $cnt_phpfpm_frontend $cnt_phpfpm_rest $cnt_pgadmin $cnt_phpfpm_ldapadmin $cnt_cron
|
||||
docker kill $cnt_postgres $cnt_nginx_public $cnt_nginx_internal $cnt_phpfpm_frontend $cnt_phpfpm_rest $cnt_pgadmin $cnt_phpfpm_ldapadmin $cnt_cron
|
||||
docker rm -v $cnt_postgres $cnt_nginx_public $cnt_nginx_internal $cnt_phpfpm_frontend $cnt_phpfpm_rest $cnt_pgadmin $cnt_phpfpm_ldapadmin $cnt_cron
|
||||
docker stop $cnt_all
|
||||
docker kill $cnt_all
|
||||
docker rm -v $cnt_all
|
||||
|
||||
fi
|
||||
|
||||
|
@ -160,8 +162,8 @@ fi
|
|||
|
||||
if [[ "$mode" == "--kill" ]]; then
|
||||
|
||||
docker kill $cnt_postgres $cnt_nginx_public $cnt_nginx_internal $cnt_phpfpm_frontend $cnt_phpfpm_rest $cnt_pgadmin $cnt_phpfpm_ldapadmin $cnt_cron
|
||||
docker rm -v $cnt_postgres $cnt_nginx_public $cnt_nginx_internal $cnt_phpfpm_frontend $cnt_phpfpm_rest $cnt_pgadmin $cnt_phpfpm_ldapadmin $cnt_cron
|
||||
docker kill $cnt_all
|
||||
docker rm -v $cnt_all
|
||||
|
||||
fi
|
||||
|
||||
|
@ -254,6 +256,20 @@ if [[ "$mode" == "" || "$mode" == "--run" ]]; then
|
|||
|
||||
fi
|
||||
|
||||
if [[ "$mode" == "" || "$mode" == "--status" ]]; then
|
||||
|
||||
echo -ne "\n\nwszystko odpalone, kontenery:"
|
||||
|
||||
for cnt in $cnt_all; do
|
||||
if [[ "`docker inspect --format '{{ .State.Running }}' $cnt`" == "true" ]]; then
|
||||
echo " - $cnt : `docker inspect --format '{{ .NetworkSettings.IPAddress }}' $cnt`"
|
||||
else
|
||||
echo " - $cnt : leży"
|
||||
fi
|
||||
done
|
||||
|
||||
fi
|
||||
|
||||
# food for thought
|
||||
# https://medium.com/coding-and-deploying-in-the-cloud/simple-logging-to-logentries-from-a-docker-container-d3609073db30
|
||||
# http://phusion.github.io/baseimage-docker/
|
||||
|
|
Loading…
Reference in New Issue