Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestions to improve the Docker primary examples. #1434

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions docs/content/examples/postgresql/primary.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,26 @@ To shutdown the instance and remove the container for each example, run the foll
## Docker


To create the example and run the container:
To create the example and run the container first pick a tag from, for example,
https://www.crunchydata.com/developers/download-postgres/containers/postgresql14
then run:
```
cd $CCPROOT/examples/docker/primary
cd examples/docker/primary
export CCP_IMAGE_PREFIX=registry.developers.crunchydata.com/crunchydata
export CCP_IMAGE_TAG=ubi8-14.2-1
./run.sh
```

Connect from your local host as follows:
```
psql -h localhost -U testuser -W userdb
PGPASSWORD=password psql -h localhost -U primaryuser userdb
```

## Kubernetes and OpenShift

To create the example:
```
cd $CCPROOT/examples/kube/primary
cd examples/kube/primary
./run.sh
```

Expand All @@ -59,5 +63,5 @@ psql -h primary -U postgres postgres

## Helm

This example resides under the `$CCPROOT/examples/helm` directory. View the README to run this
This example resides under the `examples/helm` directory. View the README to run this
example using Helm [here](https://github.com/CrunchyData/crunchy-containers/blob/master/examples/helm/primary/README.md).
1 change: 1 addition & 0 deletions examples/docker/primary/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ docker volume create --driver local --name=primary-pgdata
docker run \
-p 5432:5432 \
-v primary-pgdata:/pgdata \
-e MODE=postgres \
-e PG_MODE=primary \
-e PG_USER=testuser \
-e PG_PASSWORD=password \
Expand Down