From cf28ae5d178c0d239d7ebd62d99252d825422f30 Mon Sep 17 00:00:00 2001 From: Mikhail Gerasimchuk Date: Thu, 31 Oct 2024 19:23:24 +0700 Subject: [PATCH] Migrate from docker-compose to docker compose --- Makefile | 16 ++++++++-------- README.md | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index c52a72c..5110bc1 100644 --- a/Makefile +++ b/Makefile @@ -1,25 +1,25 @@ DOCKER_COMPOSE_FILENAME=deployments/docker-compose/docker-compose.yaml start: vendor-install - docker-compose -f ${DOCKER_COMPOSE_FILENAME} up -d + docker compose -f ${DOCKER_COMPOSE_FILENAME} up -d start-from-scratch: stop - docker-compose --file ${DOCKER_COMPOSE_FILENAME} up --remove-orphans --renew-anon-volumes --force-recreate --build -d + docker compose --file ${DOCKER_COMPOSE_FILENAME} up --remove-orphans --renew-anon-volumes --force-recreate --build -d stop: - docker-compose -f ${DOCKER_COMPOSE_FILENAME} down + docker compose -f ${DOCKER_COMPOSE_FILENAME} down restart: stop start logs-api: - docker-compose -f ${DOCKER_COMPOSE_FILENAME} logs -f api + docker compose -f ${DOCKER_COMPOSE_FILENAME} logs -f api logs-verifier: - docker-compose -f ${DOCKER_COMPOSE_FILENAME} logs -f verifier + docker compose -f ${DOCKER_COMPOSE_FILENAME} logs -f verifier test-unit: vendor-install docker run -v $(shell pwd):/app -w /app golang:1.20.0 /bin/bash \ -c 'go test -covermode=count -coverprofile=assets/coverage/unit/coverage.out -v ./internal/... && go tool cover -html=assets/coverage/unit/coverage.out -o=assets/coverage/unit/coverage.html' test-integration-api: start - if ! docker-compose -f ${DOCKER_COMPOSE_FILENAME} run test-integration-api; then \ + if ! docker compose -f ${DOCKER_COMPOSE_FILENAME} run test-integration-api; then \ echo "\nLogs for api from docker-compose:" ;\ - docker-compose -f ${DOCKER_COMPOSE_FILENAME} logs api; \ + docker compose -f ${DOCKER_COMPOSE_FILENAME} logs api; \ echo "\nServices status:" ;\ - docker-compose -f ${DOCKER_COMPOSE_FILENAME} ps ;\ + docker compose -f ${DOCKER_COMPOSE_FILENAME} ps ;\ exit 255 ;\ fi lint-golangci: vendor-install diff --git a/README.md b/README.md index 12b980d..1a174b5 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ curl --location --request DELETE 'localhost:8080/v1/bookings/10227205-3628-4c94- See data in DB: ``` -docker-compose -f deployments/docker-compose/docker-compose.yaml run migrations-up bash -c 'psql -c "SELECT * FROM bookings"' +docker compose -f deployments/docker-compose/docker-compose.yaml run migrations-up bash -c 'psql -c "SELECT * FROM bookings"' ``` ## Configuration