Skip to content

Fix: remove deprecated 'docker-compose' #226

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions localinstall/2-install_api.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
#!/bin/sh
. ./main.cfg

# is docker-compose exists? if not use docker compose
if [ -z "$(which docker-compose)" ]; then
echo "docker-compose is not installed, using docker compose"
DOCKER_COMPOSE="docker compose"
else
DOCKER_COMPOSE="docker-compose"
fi

# i am groot?
if [ $(id -u) -ne 0 ]; then
SUDO=sudo
Expand Down Expand Up @@ -36,8 +28,8 @@ fi
cat ../../ssh.key.pub > docker/ssh/user-data/authorized_keys

# down, just in case old containers are running
${DOCKER_COMPOSE} down
${DOCKER_COMPOSE} up -d
docker compose down
docker compose up -d
echo "Waiting for API to be up"
sleep 1
# loop until the API is up, try 5 times
Expand Down
13 changes: 3 additions & 10 deletions localinstall/4-start-cycle.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
#!/bin/bash
. ./main.cfg

# is docker-compose exists? if not use docker compose
if [ -z "$(which docker-compose)" ]; then
echo "docker-compose is not installed, using docker compose"
DOCKER_COMPOSE="docker compose"
else
DOCKER_COMPOSE="docker-compose"
fi

cd kernelci/kernelci-pipeline
${DOCKER_COMPOSE} down
${DOCKER_COMPOSE} up -d
docker compose down
docker compose up -d

echo "You can view now logs of containers using docker logs -f <container_id> or docker-compose logs -f in kernelci/kernelci-pipeline or kernelci/kernelci-api directories"
echo "Also you can do docker ps to see running containers, and in case of ongoing builds, you can view their logs too by docker logs -f <container_id>"
echo "You can also open API viewer at http://127.0.0.1:8001/viewer"