Skip to content

Commit

Permalink
postgres password in table and healthcheck sample
Browse files Browse the repository at this point in the history
  • Loading branch information
webysther committed Jul 21, 2023
1 parent 3e219f3 commit 453262c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Provided by the PRs [#3107](https://github.com/hoppscotch/hoppscotch/pull/3107)
| `-e POSTGRES_PORT=` | Default is 5432|
| `-e POSTGRES_DB=` | Default is hoppscotch|
| `-e POSTGRES_USER=` | Default is postgres|
| `-e POSTGRES_PASSWORD=` | postgres password|

Provided by [hoppscotch](https://docs.hoppscotch.io/documentation/self-host/install-and-build/#configuring-the-environment):

Expand Down Expand Up @@ -144,6 +145,9 @@ services:
- /path/to/hoppscotch/config:/config
ports:
- 80:80
depends_on:
hoppscotch-db:
condition: service_healthy
restart: unless-stopped

hoppscotch-db:
Expand All @@ -159,6 +163,14 @@ services:
- /path/to/postgres/data:/var/lib/postgresql/data
expose:
- 5432
healthcheck:
test: [
"CMD-SHELL",
"sh -c 'pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}'"
]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped

networks:
Expand Down

0 comments on commit 453262c

Please sign in to comment.