mirror of
https://github.com/wassname/docker-postgresql.git
synced 2026-09-11 12:10:47 +08:00
readme: moved logs section towards the end
This commit is contained in:
@@ -8,7 +8,6 @@
|
|||||||
- [Getting started](#getting-started)
|
- [Getting started](#getting-started)
|
||||||
- [Installation](#installation)
|
- [Installation](#installation)
|
||||||
- [Quickstart](#quickstart)
|
- [Quickstart](#quickstart)
|
||||||
- [Command-line arguments](#command-line-arguments)
|
|
||||||
- [Persistence](#persistence)
|
- [Persistence](#persistence)
|
||||||
- [Setting the default locale](#setting-the-default-locale)
|
- [Setting the default locale](#setting-the-default-locale)
|
||||||
- [Trusting local connections](#trusting-local-connections)
|
- [Trusting local connections](#trusting-local-connections)
|
||||||
@@ -21,6 +20,7 @@
|
|||||||
- [Creating a snapshot](#creating-a-snapshot)
|
- [Creating a snapshot](#creating-a-snapshot)
|
||||||
- [Creating a backup](#creating-a-backup)
|
- [Creating a backup](#creating-a-backup)
|
||||||
- [Logs](#logs)
|
- [Logs](#logs)
|
||||||
|
- [Command-line arguments](#command-line-arguments)
|
||||||
- [UID/GID mapping](#uid-gid-mapping)
|
- [UID/GID mapping](#uid-gid-mapping)
|
||||||
- [Maintenance](#maintenance)
|
- [Maintenance](#maintenance)
|
||||||
- [Upgrading](#upgrading)
|
- [Upgrading](#upgrading)
|
||||||
@@ -89,17 +89,6 @@ docker exec -it postgresql sudo -u postgres psql
|
|||||||
|
|
||||||
*Alternatively, you can use the sample [docker-compose.yml](docker-compose.yml) file to start the container using [Docker Compose](https://docs.docker.com/compose/)*
|
*Alternatively, you can use the sample [docker-compose.yml](docker-compose.yml) file to start the container using [Docker Compose](https://docs.docker.com/compose/)*
|
||||||
|
|
||||||
## 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.
|
|
||||||
|
|
||||||
## Persistence
|
## Persistence
|
||||||
|
|
||||||
For PostgreSQL to preserve its state across container shutdown and startup you should mount a volume at `/var/lib/postgresql`.
|
For PostgreSQL to preserve its state across container shutdown and startup you should mount a volume at `/var/lib/postgresql`.
|
||||||
@@ -320,6 +309,17 @@ 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
|
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
|
# 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.
|
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.
|
||||||
|
|||||||
Reference in New Issue
Block a user