mirror of
https://github.com/wassname/docker-postgresql.git
synced 2026-06-28 22:36:20 +08:00
readme: moved logs section towards the end
This commit is contained in:
@@ -8,7 +8,6 @@
|
||||
- [Getting started](#getting-started)
|
||||
- [Installation](#installation)
|
||||
- [Quickstart](#quickstart)
|
||||
- [Command-line arguments](#command-line-arguments)
|
||||
- [Persistence](#persistence)
|
||||
- [Setting the default locale](#setting-the-default-locale)
|
||||
- [Trusting local connections](#trusting-local-connections)
|
||||
@@ -21,6 +20,7 @@
|
||||
- [Creating a snapshot](#creating-a-snapshot)
|
||||
- [Creating a backup](#creating-a-backup)
|
||||
- [Logs](#logs)
|
||||
- [Command-line arguments](#command-line-arguments)
|
||||
- [UID/GID mapping](#uid-gid-mapping)
|
||||
- [Maintenance](#maintenance)
|
||||
- [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/)*
|
||||
|
||||
## 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
|
||||
|
||||
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
|
||||
```
|
||||
|
||||
## 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.
|
||||
|
||||
Reference in New Issue
Block a user