Skip to content

Commit

Permalink
chore(deprecation): update compose commands to v2
Browse files Browse the repository at this point in the history
* Linked to deprecation of Docker Compose v1 in
Github Actions: actions/runner-images#9692
* Updates dependencies and fixes safety tests.

Co-Authored-by: Pascal Repond <pascal.repond@rero.ch>
  • Loading branch information
PascalRepond committed Aug 8, 2024
1 parent b3bbe03 commit 77d0120
Show file tree
Hide file tree
Showing 6 changed files with 896 additions and 835 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/continuous-integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
node-version: '18'

- name: Docker compose up
run: docker-compose up -d
run: docker compose up -d

- name: Setup Python 3.9
uses: actions/setup-python@v3
Expand Down
6 changes: 3 additions & 3 deletions INSTALL.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Elasticsearch 6, RabbitMQ and Redis):

.. code-block:: console
$ docker-compose up -d
$ docker compose up -d
Make sure you have `enough virtual memory
Expand Down Expand Up @@ -113,15 +113,15 @@ You can use simulate a full production environment using the
.. code-block:: console
$ ./docker/build-images.sh
$ docker-compose -f docker-compose.full.yml up -d
$ docker compose -f docker-compose.full.yml up -d
$ ./docker/wait-for-services.sh --full
Remember to create database tables, search indexes and message queues if not
already done:

.. code-block:: console
$ docker-compose -f docker-compose.full.yml run --rm web-ui "poetry run ./scripts/setup"
$ docker compose -f docker-compose.full.yml run --rm web-ui "poetry run ./scripts/setup"
In addition to the normal ``docker-compose.yml``, this one will start:

Expand Down
3 changes: 1 addition & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#
# Usage::
#
# $ docker-compose up -d
# $ docker compose up -d
# $ ./docker/wait-for-services.sh
#
# Following services are included:
Expand All @@ -28,7 +28,6 @@
# - Message queue: RabbitMQ (exposed ports: 5672, 15672)
# - Elasticsearch (exposed ports: 9200, 9300)
#
version: '2.3'
services:
cache:
extends:
Expand Down
6 changes: 3 additions & 3 deletions docker/wait-for-services.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@ check_ready() {
fi
done
}
_db_check(){ docker-compose exec --user postgres db bash -c "pg_isready" &>/dev/null; }
_db_check(){ docker compose exec --user postgres db bash -c "pg_isready" &>/dev/null; }
check_ready "Postgres" _db_check

_es_check(){ curl --output /dev/null --silent --head --fail http://localhost:9200 &>/dev/null; }
check_ready "Elasticsearch" _es_check

_redis_check(){ docker-compose exec cache bash -c 'redis-cli ping' | grep 'PONG' &> /dev/null; }
_redis_check(){ docker compose exec cache bash -c 'redis-cli ping' | grep 'PONG' &> /dev/null; }
check_ready "Redis" _redis_check

_rabbit_check(){ docker-compose exec mq bash -c "rabbitmqctl status" &>/dev/null; }
_rabbit_check(){ docker compose exec mq bash -c "rabbitmqctl status" &>/dev/null; }
check_ready "RabbitMQ" _rabbit_check

_web_server_check_css(){
Expand Down
Loading

0 comments on commit 77d0120

Please sign in to comment.