Skip to content

Commit

Permalink
chore: fix docker cmd in make
Browse files Browse the repository at this point in the history
  • Loading branch information
robcxyz committed Oct 15, 2024
1 parent c87de9d commit 7513b36
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
test: up-dbs test-unit test-integration

up-dbs: ## Bring up the DBs
docker-compose -f docker-compose.db.yml up -d
docker compose -f docker-compose.db.yml up -d
echo "Waiting for backend to populate some records..."
sleep 10

down-dbs: ## Take down the DBs
docker-compose -f docker-compose.db.yml down
docker compose -f docker-compose.db.yml down

test-unit: ## Run unit tests - Need DB compose up
cd src && go test ./... -v --tags=unit
Expand All @@ -22,13 +22,13 @@ test-coverage: up-dbs ## Run unit tests - Need DB compose up
cd src && go test ./... -v -race -covermode=atomic -coverprofile=../coverage.out

pull:
docker-compose -f docker-compose.db.yml -f docker-compose.yml pull
docker compose -f docker-compose.db.yml -f docker-compose.yml pull

up: ## Bring everything up as containers
docker-compose -f docker-compose.db.yml -f docker-compose.yml up -d
docker compose -f docker-compose.db.yml -f docker-compose.yml up -d

down: ## Take down all the containers
docker-compose -f docker-compose.db.yml -f docker-compose.yml down -v
docker compose -f docker-compose.db.yml -f docker-compose.yml down -v

clean:
docker volume rm $(docker volume ls -q)
Expand All @@ -37,16 +37,16 @@ build-swagger: ## Build the swagger docs
cd src/api && bash generateSwagDocs.sh

build: ## Build everything
docker-compose build
docker compose build

ps: ## List all containers and running status
docker-compose -f docker-compose.db.yml -f docker-compose.yml ps
docker compose -f docker-compose.db.yml -f docker-compose.yml ps

postgres-console: ## Start postgres terminal
docker-compose -f docker-compose.db.yml -f docker-compose.yml exec postgres psql -U postgres
docker compose -f docker-compose.db.yml -f docker-compose.yml exec postgres psql -U postgres

redis-console: ## Start redis terminal
docker-compose -f docker-compose.db.yml -f docker-compose.yml exec redis redis-cli
docker compose -f docker-compose.db.yml -f docker-compose.yml exec redis redis-cli

help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-16s\033[0m %s\n", $$1, $$2}'

0 comments on commit 7513b36

Please sign in to comment.