This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Show container log. | |
dl() { | |
if [ "$1" = "service" ]; then | |
docker service logs -f --tail 100 $2 | |
return | |
fi; | |
docker logs -f --tail 100 $2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dl() { | |
if [ "$1" = "service" ]; then | |
docker service logs -f --tail 100 $2 | |
exit 0 | |
fi; | |
docker logs -f --tail 100 $2 | |
} | |
__dl() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dockershell() { | |
if [ "$1" = "service" ]; then | |
ID=$(docker inspect --format '{{.Status.ContainerStatus.ContainerID}}' $(docker service ps -q "$2" | head -1)) | |
else | |
ID=$2 | |
fi; | |
docker exec -t -i -e PS1="$ID:\w# " "$ID" bash --noprofile --norc | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
declare(ticks=1); | |
namespace App\Console; | |
use Illuminate\Console\Command; | |
use Symfony\Component\Console\Input\InputInterface; | |
use Symfony\Component\Console\Output\OutputInterface; | |
abstract class DaemonCommand extends Command { |