You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+30-4Lines changed: 30 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,19 @@
1
1
# PostgreSQL Auto-Conf
2
2
3
+
OpenSPP-flavoured fork of [Tecnativa/docker-postgres-autoconf](https://github.com/Tecnativa/docker-postgres-autoconf) with:
4
+
5
+
- Support for PostgreSQL 18 (latest) plus 15/16/17 builds.
6
+
- Optional PostGIS image built from source (3.6.x as of Nov 2025).
7
+
- Extra pgxn extensions (powa, pg_qualstats, pg_stat_kcache, pg_track_settings, postgresql_anonymizer) preinstalled on the base image when available for the target PostgreSQL version.
8
+
- New upstream features: pgvector packaged for PG ≥ 12 and `HBA_EXTRA_RULES` support.
9
+
3
10
## What
4
11
5
12
Image that configures Postgres before starting it.
6
13
7
14
## Why
8
15
9
-
To automate dealing with specific users accessing from specific networks to a postgres server.
16
+
To automate dealing with specific users accessing from specific networks to a Postgres server.
10
17
11
18
## How
12
19
@@ -35,7 +42,7 @@ JSON object with some or all of these keys:
35
42
-`server.cert.pem`: PEM contents for Postgres' `ssl_cert_file` parameter. The Postgres server will identify himself and encrypt the connection with this certificate.
36
43
-`server.key.pem`: PEM contents for Postgres' `ssl_key_file` parameter. The Postgres server will identify himself and encrypt the connection with this private key.
37
44
38
-
If you pass `server.cert.pem`, you should pass `server.key.pem` too, and viceversa, or TLS encryption will not be properly configured. You also need both of them if you use `client.ca.cert.pem`.
45
+
If you pass `server.cert.pem`, you should pass `server.key.pem` too, and vice versa, or TLS encryption will not be properly configured. You also need both of them if you use `client.ca.cert.pem`.
39
46
40
47
It is safer to mount files with secrets instead of passing a JSON string in an env variable. You can mount the equivalents:
41
48
@@ -67,7 +74,7 @@ Some placeholders can be expanded. See the [`Dockerfile`][] to know them.
67
74
68
75
#### `LAN_TLS`
69
76
70
-
Wether to enable or not TLS in LAN connections.
77
+
Whether to enable or not TLS in LAN connections.
71
78
72
79
#### `LAN_USERS`
73
80
@@ -93,8 +100,27 @@ Some placeholders can be expanded. See the [`Dockerfile`][] to know them.
93
100
94
101
#### `WAN_TLS`
95
102
96
-
Wether to enable or not TLS in WAN connections.
103
+
Whether to enable or not TLS in WAN connections.
97
104
98
105
#### `WAN_USERS`
99
106
100
107
Users allowed to connect from WAN.
108
+
109
+
#### `HBA_EXTRA_RULES`
110
+
111
+
JSON array of additional `pg_hba.conf` rules to append. Each array element should be a string representing a valid `pg_hba.conf` line.
112
+
113
+
Example `HBA_EXTRA_RULES` format in an `.env` file:
114
+
115
+
```
116
+
HBA_EXTRA_RULES=["host all all 192.168.1.0/24 md5", "hostssl mydb myuser 10.0.0.0/8 scram-sha-256"]
0 commit comments