Skip to content

Commit e0db4df

Browse files
committed
fix(setup_admin_user): Script should be flexible on docker-compose
Newer version of docker-compose is called as "docker compose", so try automatically to use it, if docker-compose is missing. Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
1 parent 19066a0 commit e0db4df

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

scripts/setup_admin_user

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
#!/bin/bash
22

3+
# is docker-compose exists? if not use docker compose
4+
if [ -z "$(which docker-compose)" ]; then
5+
echo "docker-compose is not installed, using docker compose"
6+
DOCKER_COMPOSE="docker compose"
7+
else
8+
DOCKER_COMPOSE="docker-compose"
9+
fi
10+
311
set -e
412

5-
docker-compose run api python3 -m api.admin $*
13+
${DOCKER_COMPOSE} run api python3 -m api.admin $*
614

715
exit 0

0 commit comments

Comments
 (0)