@@ -11,13 +11,14 @@ Replacing the `DOCKER_REPO` with the repository you want to push the image to.
1111
1212## Environment variables
1313
14- The image can be run as a primary or replica, depending on the environment variables passed on the
14+ The image can be run as a standalone instance, primary, or replica, depending on the environment variables passed on the
1515docker command line:
1616
1717* ` POSTGRES_REPLICATION_PRIMARY ` : ** Required for replica** The host and port that the replica will use
1818 to connect to the primary, in the form ` host=<hostname> port=5432 ` . When not set,
19- the instance role is a primary.
20- * ` POSTGRES_REPLICATION_PASSWORD ` : ** Required** : The password for the ` POSTGRES_REPLICATION_USER ` .
19+ the instance role is a primary or standalone.
20+ * ` POSTGRES_REPLICATION_PASSWORD ` : ** Required for replication** : The password for the ` POSTGRES_REPLICATION_USER ` .
21+ If not set, replication is disabled and the instance runs as a standalone server.
2122* ` POSTGRES_REPLICATION_USER ` : ** Default is ` replicator ` ** : The user that the replica will use to connect to the primary.
2223* ` POSTGRES_REPLICATION_SLOT ` : ** Default is ` replica1 ` ** : The replication slot for each replica.
2324 On the primary, this is a comma-separated list of replication slots. On a replica, this is the name
@@ -34,6 +35,22 @@ docker command line:
3435* ` POSTGRES_SSL_CA ` : ** Optional** : The SSL CA certificate file location for client certificate verification.
3536 Only used when ` POSTGRES_SSL_CERT ` and ` POSTGRES_SSL_KEY ` are set.
3637
38+ ## Running a standalone server
39+
40+ Example of running a standalone PostgreSQL instance without replication:
41+
42+ ``` bash
43+ docker volume create postgres-data
44+ docker run \
45+ --rm --name postgres \
46+ -e POSTGRES_PASSWORD=" postgres" \
47+ -p 5432:5432 \
48+ -v postgres-data:/var/lib/postgresql/data \
49+ ghcr.io/mutablelogic/docker-postgres:17-bookworm
50+ ```
51+
52+ This gives you PostgreSQL with ` pg_stat_statements ` pre-loaded, plus PostGIS and pgvector available.
53+
3754## Running a Primary server
3855
3956Example of running a primary instance, with two replication slots.
0 commit comments