postgresql/README.md
Nils Philippsen 1ae18a54f9 bring in line with github.com/container-images
- use baseruntime:latest as base image
- reimplement cgroup-limits in shell
- take real memory size into account for configuration
- don't use nss_wrapper.so
- don't reference separate shared-userspace repo
- fix usage label
- get rid of /var/lib/psql <-> .../data distinction
- drop a few unused files from root/
2017-05-19 11:46:10 +02:00

41 lines
1.2 KiB
Markdown

# PostgreSQL
PostgreSQL is an object-relational Database Management System.
This is based on the SCL container image for version 9.5 at:
https://github.com/sclorg/postgresql-container
## Configuration
You must either specify the following environment variables:
* POSTGRESQL_USER
* POSTGRESQL_PASSWORD
* POSTGRESQL_DATABASE
Or the following environment variable:
* POSTGRESQL_ADMIN_PASSWORD
Or both.
Optional settings:
* POSTGRESQL_MAX_CONNECTIONS (default: 100)
* POSTGRESQL_MAX_PREPARED_TRANSACTIONS (default: 0)
* POSTGRESQL_SHARED_BUFFERS (default: 32MB)
## Running in docker
```
docker run -v <dbroot_path>:/var/lib/pgsql:Z -p 5432:5432 -e POSTGRESQL_USER=<user> -e POSTGRESQL_PASSWORD=<password> -e POSTGRESQL_DATABASE=<database> modularitycontainers/postgresql
```
Substitute these placeholders with real values:
* `dbroot_path` - path to the database root on the host which should be mounted
on `/var/lib/pgsql` in the container. Note that the `postgres` user (uid 26)
needs to be able to read and write in that directory.
* `user`, `password`, `database` - details with which a database and user
should be created if the database cluster directory isn't initialized yet.