Skip to content

Commit

Permalink
chore: use docker compose plugin instead of legacy docker-compose
Browse files Browse the repository at this point in the history
Followup to #231
  • Loading branch information
nijel committed Mar 13, 2024
1 parent 8110fd9 commit 8d2a2e1
Show file tree
Hide file tree
Showing 14 changed files with 19 additions and 18 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion test-admin
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion test-boot
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/sh
docker-compose up -d
docker compose up -d
2 changes: 1 addition & 1 deletion test-checks
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion test-commands
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
set -e
docker-compose exec -T \
docker compose exec -T \
--user weblate \
weblate licensee --help
4 changes: 2 additions & 2 deletions test-health
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion test-inspect
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh
CONTAINER=$(docker-compose ps | grep _weblate_ | sed 's/[[:space:]].*//')
CONTAINER=$(docker compose ps | grep -F -e -weblate- | sed 's/[[:space:]].*//')
docker inspect "$CONTAINER"
3 changes: 2 additions & 1 deletion test-logs
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#!/bin/sh
docker-compose logs
docker compose logs
docker compose ps
2 changes: 1 addition & 1 deletion test-online
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test-pip
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion test-saml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion test-stop
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/sh
docker-compose down
docker compose down
4 changes: 2 additions & 2 deletions test-supervisor
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions test-tests
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 8d2a2e1

Please sign in to comment.