Skip to content

Commit

Permalink
Merge pull request #37 from ewolinetz/readme_update
Browse files Browse the repository at this point in the history
Updating wording of README.md
  • Loading branch information
bparees committed Jun 30, 2015
2 parents 072449a + f5c2aaf commit f77a6fc
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ CentOS versions currently supported are:

Installation
----------------------
Choose between CentOS7 or RHEL7 based image:
Choose either the CentOS7 or RHEL7 based image:

* **RHEL7 based image**

To build a RHEL7-based image, you need to run Docker build on a properly
To build a RHEL7 based image, you need to run Docker build on a properly
subscribed RHEL machine.

```
Expand All @@ -34,13 +34,13 @@ Choose between CentOS7 or RHEL7 based image:

* **CentOS7 based image**

This image is available on DockerHub. To download it use:
This image is available on DockerHub. To download it run:

```
$ docker pull openshift/postgresql-92-centos7
```

To build PostgreSQL image from scratch use:
To build a PostgreSQL image from scratch run:

```
$ git clone https://github.com/openshift/postgresql.git
Expand All @@ -49,15 +49,15 @@ Choose between CentOS7 or RHEL7 based image:
```

**Notice: By omitting the `VERSION` parameter, the build/test action will be performed
on all provided versions of PostgreSQL. Since we are now providing only version `9.2`,
on all provided versions of PostgreSQL. Since we are currently providing only version `9.2`,
you can omit this parameter.**


Environment variables and volumes
----------------------------------

The image recognizes following environment variables that you can set during
initialization, by passing `-e VAR=VALUE` to the Docker run command.
The image recognizes the following environment variables that you can set during
initialization by passing `-e VAR=VALUE` to the Docker run command.

| Variable name | Description |
| :--------------------------- | ---------------------------------------------- |
Expand All @@ -66,39 +66,39 @@ initialization, by passing `-e VAR=VALUE` to the Docker run command.
| `POSTGRESQL_DATABASE` | Database name |
| `POSTGRESQL_ADMIN_PASSWORD` | Password for the `postgres` admin account (optional) |

Following environment variables influence PostgreSQL configuration file. They are all optional.
The following environment variables influence the PostgreSQL configuration file. They are all optional.

| Variable name | Description | Default
| :---------------------------- | ----------------------------------------------------------------------- | -------------------------------
| `POSTGRESQL_MAX_CONNECTIONS` | The maximum number of client connections allowed. This also sets the maximum number of prepared transactions. | 100
| `POSTGRESQL_SHARED_BUFFERS` | Sets how much memory is dedicated to PostgreSQL to use for caching data | 32M

You can also set following mount points by passing `-v /host:/container` flag to docker.
You can also set the following mount points by passing the `-v /host:/container` flag to Docker.

| Volume mount point | Description |
| :----------------------- | ------------------------------------- |
| `/var/lib/pgsql/data` | PostgreSQL database cluster directory |

**Notice: When mouting directory from host into the container, ensure that the mounted
**Notice: When mouting a directory from the host into the container, ensure that the mounted
directory has the appropriate permissions and that the owner and group of the directory
matches the user UID or name which is running inside the container.**

Usage
----------------------

We will assume that you are using the `openshift/postgresql-92-centos7` image.
If you want to set only mandatory environment variables and not store the database
in a host directory, you need to execute the following command:
For this, we will assume that you are using the `openshift/postgresql-92-centos7` image.
If you want to set only the mandatory environment variables and not store the database
in a host directory, execute the following command:

```
$ docker run -d --name postgresql_database -e POSTGRESQL_USER=user -e POSTGRESQL_PASSWORD=pass -e POSTGRESQL_DATABASE=db -p 5432:5432 openshift/postgresql-92-centos7
```

This will create a container named `postgresql_database` running PostgreSQL with
database `db` and user with credentials `user:pass`. Port 5432 will be exposed
and mapped to host. If you want your database to be persistent across container
executions, also add a `-v /host/db/path:/var/lib/pgsql/data` argument. This is
going to be the PostgreSQL database cluster directory.
and mapped to the host. If you want your database to be persistent across container
executions, also add a `-v /host/db/path:/var/lib/pgsql/data` argument. This will be
the PostgreSQL database cluster directory.

If the database cluster directory is not initialized, the entrypoint script will
first run [`initdb`](http://www.postgresql.org/docs/9.2/static/app-initdb.html)
Expand All @@ -111,22 +111,22 @@ is executed and will run as PID 1. You can stop the detached container by runnin
PostgreSQL admin account
------------------------
The admin account `postgres` has no password set by default, only allowing local
connections. You can set it by setting `POSTGRESQL_ADMIN_PASSWORD` environment
connections. You can set it by setting the `POSTGRESQL_ADMIN_PASSWORD` environment
variable when initializing your container. This will allow you to login to the
`postgres` account remotely. Local connections will still not require password.
`postgres` account remotely. Local connections will still not require a password.


Test
---------------------------------

This repository also provides test framework, which checks basic functionality
This repository also provides a test framework, which checks basic functionality
of the PostgreSQL image.

User can choose between testing PostgreSQL based on RHEL or CentOS image.
Users can choose between testing PostgreSQL based on a RHEL or CentOS image.

* **RHEL based image**

To test a rhel7-based PostgreSQL image, you need to run the test on a properly
To test a RHEL7 based PostgreSQL image, you need to run the test on a properly
subscribed RHEL machine.

```
Expand All @@ -142,5 +142,5 @@ User can choose between testing PostgreSQL based on RHEL or CentOS image.
```

**Notice: By omitting the `VERSION` parameter, the build/test action will be performed
on all provided versions of PostgreSQL. Since we are now providing only version `9.2`,
on all provided versions of PostgreSQL. Since we are currently providing only version `9.2`,
you can omit this parameter.**

0 comments on commit f77a6fc

Please sign in to comment.