Skip to content

Commit

Permalink
Update postgress user and password for dev
Browse files Browse the repository at this point in the history
  • Loading branch information
pollenjp committed Jul 23, 2023
1 parent ec886f2 commit dddc66a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions times-hub-api/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion times-hub-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions times-hub-api/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dddc66a

Please sign in to comment.