Add attempt at logs command
This commit is contained in:
parent
c29ce5cdda
commit
9c89834d20
11
abra
11
abra
@ -13,6 +13,7 @@ sub_help(){
|
||||
echo " service_run SERVICE [CMD] run a command in the specified service's container"
|
||||
echo " secret_generate SECRET VERSION generate a secret, store it in pass & as a Docker secret"
|
||||
echo " deploy [COMPOSE_FILE] let 'em rip"
|
||||
echo " logs SERVICE tail logs from a deployed service"
|
||||
echo ""
|
||||
echo "Make sure \$STACK_NAME is set (probably using direnv)"
|
||||
}
|
||||
@ -65,6 +66,16 @@ sub_deploy (){
|
||||
docker stack deploy -c "$COMPOSE" "$STACK_NAME"
|
||||
}
|
||||
|
||||
sub_logs (){
|
||||
SERVICE=$1
|
||||
|
||||
docker service logs "${STACK_NAME}_${SERVICE}" \
|
||||
--follow \
|
||||
--no-trunc \
|
||||
--details \
|
||||
--timestamps
|
||||
}
|
||||
|
||||
subcommand=$1
|
||||
case $subcommand in
|
||||
"" | "-h" | "--help")
|
||||
|
Loading…
Reference in New Issue
Block a user