From 27ffe14e79676c8edd4b355899286777df8df3be Mon Sep 17 00:00:00 2001 From: Sameer Naik Date: Fri, 27 Nov 2015 18:01:36 +0530 Subject: [PATCH] readme: moved `Command-line arguments` section before `Logs` --- README.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 3298192..1ffa5c3 100644 --- a/README.md +++ b/README.md @@ -19,8 +19,8 @@ - [Setting up a replication cluster](#setting-up-a-replication-cluster) - [Creating a snapshot](#creating-a-snapshot) - [Creating a backup](#creating-a-backup) - - [Logs](#logs) - [Command-line arguments](#command-line-arguments) + - [Logs](#logs) - [UID/GID mapping](#uid-gid-mapping) - [Maintenance](#maintenance) - [Upgrading](#upgrading) @@ -294,6 +294,17 @@ docker run --name postgresql-backup -it --rm \ Once the backup is generated, the container will exit and the backup of the master data will be available at `/srv/docker/backups/postgresql.XXXXXXXXXXXX/`. Restoring the backup involves starting a container with the data in `/srv/docker/backups/postgresql.XXXXXXXXXXXX`. +## Command-line arguments + +You can customize the launch command of PostgreSQL server by specifying arguments for `postgres` on the `docker run` command. For example the following command enables connection logging: + +```bash +docker run --name postgresql -itd --restart always \ + sameersbn/postgresql:9.4-8 -c log_connections=on +``` + +Please refer to the documentation of [postgres](http://www.postgresql.org/docs/9.4/static/app-postgres.html) for the complete list of available options. + ## Logs By default the PostgreSQL server logs are sent to the standard output. Using the [Command-line arguments](#command-line-arguments) feature you can configure the PostgreSQL server to send the log output to a file using the `-c logging_collector=on` argument: @@ -309,17 +320,6 @@ To access the PostgreSQL logs you can use `docker exec`. For example: docker exec -it postgresql tail -f /var/log/postgresql/postgresql-9.4-main.log ``` -## Command-line arguments - -You can customize the launch command of PostgreSQL server by specifying arguments for `postgres` on the `docker run` command. For example the following command enables connection logging: - -```bash -docker run --name postgresql -itd --restart always \ - sameersbn/postgresql:9.4-8 -c log_connections=on -``` - -Please refer to the documentation of [postgres](http://www.postgresql.org/docs/9.4/static/app-postgres.html) for the complete list of available options. - # UID/GID mapping The files and processes created by the container are owned by the `postgres` user that is internal to the container. In the absense of user namespace in docker the UID and GID of the containers `postgres` user may have different meaning on the host.