shlink/indocker

14 lines
384 B
Text
Raw Normal View History

2017-01-19 22:56:45 +01:00
#!/usr/bin/env bash
2018-12-02 19:13:49 +01:00
# Run docker containers if they are not up yet
if ! [[ $(docker ps | grep shlink) ]]; then
2018-12-02 19:13:49 +01:00
docker-compose up -d
fi
if [[ "$*" == *"test:api:rr"* ]]; then
# API tests should be run inside the RoadRunner container when the test runtime is RoadRunner
docker exec -it shlink_roadrunner /bin/sh -c "$*"
else
docker exec -it shlink_swoole /bin/sh -c "$*"
fi