Browse Source
* Add exec.sh script to execute command on app containers * Update docspull/2101/head
Rachael Booth
1 year ago
committed by
GitHub
2 changed files with 22 additions and 6 deletions
@ -0,0 +1,10 @@
|
||||
if [ $# -ne 2 ]; |
||||
then echo "Expected 2 arguments: exec.sh env command" |
||||
fi |
||||
|
||||
env=$1 |
||||
command=$2 |
||||
cluster="core-$env-app" |
||||
|
||||
taskId=$(aws ecs list-tasks --cluster $cluster --service-name "core-$env-app" --query "taskArns[0]" | grep -o "/$cluster/\w*" | sed "s@/$cluster/@@g") |
||||
aws ecs execute-command --cluster "core-$env-app" --task $taskId --interactive --command "$command" |
Loading…
Reference in new issue