dev: add make psql and make redis-cli to execute psql/redis-cli in database containers

This commit is contained in:
naskya 2024-03-23 16:57:37 +09:00
parent 6694b61c12
commit a31c342af4
No known key found for this signature in database
GPG key ID: 712D413B3A9FED5C
2 changed files with 12 additions and 0 deletions

View file

@ -36,3 +36,9 @@ db.up:
$(MAKE) -C ./dev/db-container up
db.down:
$(MAKE) -C ./dev/db-container down
.PHONY: psql redis-cli
psql:
$(MAKE) -C ./dev/db-container psql
redis-cli:
$(MAKE) -C ./dev/db-container redis-cli

View file

@ -4,3 +4,9 @@ up:
$(COMPOSE) up --detach
down:
$(COMPOSE) down
.PHONY: psql redis-cli
psql:
$(COMPOSE) exec db psql --user=$(POSTGRES_USER) --dbname=$(POSTGRES_DB)
redis-cli:
$(COMPOSE) exec redis redis-cli