1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-29 10:24:20 +01:00
fab-manager/scripts/run.sh

18 lines
321 B
Bash
Raw Normal View History

#!/usr/bin/env bash
yq() {
docker run --rm -i -v "${PWD}:/workdir" mikefarah/yq:4 "$@"
}
config() {
SERVICE="$(yq eval '.services.*.image | select(. == "sleede/fab-manager*") | path | .[-2]' docker-compose.yml)"
}
run()
{
config
2021-05-17 15:25:05 +02:00
docker-compose exec "$SERVICE" bundle exec rails "${@:-c}" </dev/tty
}
run "$@"