diff --git a/times-hub-api/Makefile b/times-hub-api/Makefile index c4c4c32..2f11ac1 100644 --- a/times-hub-api/Makefile +++ b/times-hub-api/Makefile @@ -31,6 +31,11 @@ db-build: ## Build docker compose db-up: ## Run docker compose up in the background docker compose ${COMPOSE_ARGS} up -d +.PHONY: db-exec +db-exec: + docker compose ${COMPOSE_ARGS} exec database bash -c \ + 'PGPASSWORD='times-hub' psql --username times-hub --dbname workspaces' + PHNEY: db-down db-down: ## Run docker compose down docker compose ${COMPOSE_ARGS} down diff --git a/times-hub-api/README.md b/times-hub-api/README.md index 52b0f38..e2c3706 100644 --- a/times-hub-api/README.md +++ b/times-hub-api/README.md @@ -7,7 +7,7 @@ `.env` ```.env -DATABASE_URL="postgres://admin:admin@localhost:5432/workspaces" +DATABASE_URL="postgres://times-hub:times-hub@localhost:5432/workspaces" ``` ```sh diff --git a/times-hub-api/docker/docker-compose.yml b/times-hub-api/docker/docker-compose.yml index 3dc0468..a921f38 100644 --- a/times-hub-api/docker/docker-compose.yml +++ b/times-hub-api/docker/docker-compose.yml @@ -10,8 +10,8 @@ services: volumes: - pgdata:/var/lib/postgresql/data environment: - POSTGRES_PASSWORD: admin - POSTGRES_USER: admin + POSTGRES_PASSWORD: times-hub + POSTGRES_USER: times-hub POSTGRES_DB: workspaces TZ: Asia/Tokyo restart: always