Skip to content

Commit

Permalink
Add postgres health check
Browse files Browse the repository at this point in the history
  • Loading branch information
UNiXMIT committed Jan 24, 2024
1 parent dcec498 commit bc75c82
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions postgres.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
# PostgreSQL

### Pull and Run container
```
podman pull postgres:latest
podman run -d -p 5432:5432 --name postgres -e POSTGRES_USER=support -e POSTGRES_PASSWORD=strongPassword123 -e POSTGRES_DB=support postgres:latest
podman run -d --name postgres \
-e POSTGRES_USER=support \
-e POSTGRES_PASSWORD=strongPassword123 \
-e POSTGRES_DB=support \
-e PGUSER=support
-p 5432:5432
--health-cmd 'pg_isready -d db_prod' \
--health-interval 30s \
--health-timeout 10s \
--health-retries 5 \
--health-start-period 80s \
postgres:latest
```

### Attach to container
Expand Down

0 comments on commit bc75c82

Please sign in to comment.