From cc93b5c5cf8b8fe35826dc04b8fe6d34b850fe5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Wed, 13 Mar 2024 08:24:03 +0100 Subject: [PATCH] chore: use docker compose plugin instead of legacy docker-compose Followup to #231 --- README.rst | 2 +- test-admin | 2 +- test-boot | 2 +- test-checks | 2 +- test-commands | 2 +- test-health | 4 ++-- test-inspect | 2 +- test-logs | 3 ++- test-online | 2 +- test-pip | 2 +- test-saml | 2 +- test-stop | 2 +- test-supervisor | 4 ++-- test-tests | 6 +++--- 14 files changed, 19 insertions(+), 18 deletions(-) diff --git a/README.rst b/README.rst index 78400a3..0c9132d 100644 --- a/README.rst +++ b/README.rst @@ -50,7 +50,7 @@ Getting started .. code-block:: shell - docker-compose up + docker compose up 5. For more detailed instructions and configuration visit https://docs.weblate.org/en/latest/admin/install/docker.html diff --git a/test-admin b/test-admin index 130310d..c410b91 100755 --- a/test-admin +++ b/test-admin @@ -1,2 +1,2 @@ #!/bin/sh -docker-compose exec -T --user weblate weblate weblate createadmin --update || exit 1 +docker compose exec -T --user weblate weblate weblate createadmin --update || exit 1 diff --git a/test-boot b/test-boot index 592288c..7deb30a 100755 --- a/test-boot +++ b/test-boot @@ -1,2 +1,2 @@ #!/bin/sh -docker-compose up -d +docker compose up -d diff --git a/test-checks b/test-checks index 83af26e..13526b2 100755 --- a/test-checks +++ b/test-checks @@ -1,5 +1,5 @@ #!/bin/sh -docker-compose exec -T \ +docker compose exec -T \ --user weblate \ --env WEBLATE_SILENCED_SYSTEM_CHECKS=weblate.E003,weblate.E011,weblate.E012,weblate.E013,weblate.E017,security.W004,security.W008,security.W012,security.W018,weblate.I021,weblate.E016,weblate.I028,weblate.C030 \ weblate weblate check --deploy --fail-level WARNING diff --git a/test-commands b/test-commands index 6a2c794..809674d 100755 --- a/test-commands +++ b/test-commands @@ -1,5 +1,5 @@ #!/bin/sh set -e -docker-compose exec -T \ +docker compose exec -T \ --user weblate \ weblate licensee --help diff --git a/test-health b/test-health index c272360..931f607 100755 --- a/test-health +++ b/test-health @@ -1,5 +1,5 @@ #!/bin/sh -docker-compose ps -docker-compose exec -T \ +docker compose ps +docker compose exec -T \ --user weblate \ weblate /app/bin/health_check diff --git a/test-inspect b/test-inspect index d5e7c21..fca64f3 100755 --- a/test-inspect +++ b/test-inspect @@ -1,3 +1,3 @@ #!/bin/sh -CONTAINER=$(docker-compose ps | grep _weblate_ | sed 's/[[:space:]].*//') +CONTAINER=$(docker compose ps | grep _weblate_ | sed 's/[[:space:]].*//') docker inspect "$CONTAINER" diff --git a/test-logs b/test-logs index e4bc51b..f5b553a 100755 --- a/test-logs +++ b/test-logs @@ -1,2 +1,3 @@ #!/bin/sh -docker-compose logs +docker compose logs +docker compose ps diff --git a/test-online b/test-online index 7e12d53..b7da157 100755 --- a/test-online +++ b/test-online @@ -15,7 +15,7 @@ RET=$? curl --insecure --verbose --fail --max-time 3 --output /dev/null "${URL}static/weblate-128.png" RET2=$? # Display logs so far -docker-compose logs +docker compose logs if [ $RET2 -ne 0 ] || [ $RET -ne 0 ] ; then exit 1 diff --git a/test-pip b/test-pip index 64afc95..27e60ef 100755 --- a/test-pip +++ b/test-pip @@ -1,2 +1,2 @@ #!/bin/sh -docker-compose exec -T weblate pip3 list --no-cache-dir --disable-pip-version-check +docker compose exec -T weblate pip3 list --no-cache-dir --disable-pip-version-check diff --git a/test-saml b/test-saml index 3113113..4c8d0e8 100755 --- a/test-saml +++ b/test-saml @@ -1,2 +1,2 @@ #!/bin/sh -docker-compose exec -T weblate openssl x509 -in /app/data/ssl/saml.crt -text -noout +docker compose exec -T weblate openssl x509 -in /app/data/ssl/saml.crt -text -noout diff --git a/test-stop b/test-stop index af57d52..db2a2ba 100755 --- a/test-stop +++ b/test-stop @@ -1,2 +1,2 @@ #!/bin/sh -docker-compose down +docker compose down diff --git a/test-supervisor b/test-supervisor index 21aff5b..08d4a34 100755 --- a/test-supervisor +++ b/test-supervisor @@ -1,8 +1,8 @@ #!/bin/sh -docker-compose exec -T weblate supervisorctl status all +docker compose exec -T weblate supervisorctl status all RET=$? # The 3 happens with EXITED check and supervisor 4 if [ $RET -ne 0 ] && [ $RET -ne 3 ] ; then - docker-compose logs + docker compose logs exit 1 fi diff --git a/test-tests b/test-tests index cc8c2fd..de49fda 100755 --- a/test-tests +++ b/test-tests @@ -1,9 +1,9 @@ #!/bin/sh set -e -docker-compose exec -T --user weblate --env CI_BASE_DIR=/tmp --env CI_DATABASE=postgresql --env CI_DB_HOST=database --env CI_DB_NAME=weblate --env CI_DB_USER=weblate --env CI_DB_PASSWORD=weblate --env DJANGO_SETTINGS_MODULE=weblate.settings_test weblate weblate collectstatic --noinput -docker-compose exec -T --user weblate --env CI_BASE_DIR=/tmp --env CI_DATABASE=postgresql --env CI_DB_HOST=database --env CI_DB_NAME=weblate --env CI_DB_USER=weblate --env CI_DB_PASSWORD=weblate --env DJANGO_SETTINGS_MODULE=weblate.settings_test weblate weblate test --noinput weblate +docker compose exec -T --user weblate --env CI_BASE_DIR=/tmp --env CI_DATABASE=postgresql --env CI_DB_HOST=database --env CI_DB_NAME=weblate --env CI_DB_USER=weblate --env CI_DB_PASSWORD=weblate --env DJANGO_SETTINGS_MODULE=weblate.settings_test weblate weblate collectstatic --noinput +docker compose exec -T --user weblate --env CI_BASE_DIR=/tmp --env CI_DATABASE=postgresql --env CI_DB_HOST=database --env CI_DB_NAME=weblate --env CI_DB_USER=weblate --env CI_DB_PASSWORD=weblate --env DJANGO_SETTINGS_MODULE=weblate.settings_test weblate weblate test --noinput weblate RET=$? if [ $RET -ne 0 ] ; then - docker-compose logs + docker compose logs exit $RET fi