Skip to content

Commit

Permalink
Migrate from docker-compose to docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
mgerasimchuk committed Oct 31, 2024
1 parent c27fd1a commit cf28ae5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cf28ae5

Please sign in to comment.