Skip to content

Commit f5b7752

Browse files
authored
Merge pull request #162 from Aoiujz/master
Release 15-20230628
2 parents c1a9afc + f47fa19 commit f5b7752

File tree

4 files changed

+23
-23
lines changed

4 files changed

+23
-23
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ FROM ubuntu:jammy-20230605
1010
LABEL maintainer="[email protected]"
1111

1212
ENV PG_APP_HOME="/etc/docker-postgresql" \
13-
PG_VERSION=14 \
13+
PG_VERSION=15 \
1414
PG_USER=postgres \
1515
PG_HOME=/var/lib/postgresql \
1616
PG_RUNDIR=/run/postgresql \

README.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# sameersbn/postgresql:14-20230628
1+
# sameersbn/postgresql:15-20230628
22

33
- [Introduction](#introduction)
44
- [Contributing](#contributing)
@@ -59,7 +59,7 @@ Automated builds of the image are available on [Dockerhub](https://hub.docker.co
5959
> **Note**: Builds are also available on [Quay.io](https://quay.io/repository/sameersbn/postgresql)
6060
6161
```bash
62-
docker pull sameersbn/postgresql:14-20230628
62+
docker pull sameersbn/postgresql:15-20230628
6363
```
6464

6565
Alternatively you can build the image yourself.
@@ -76,7 +76,7 @@ Start PostgreSQL using:
7676
docker run --name postgresql -itd --restart always \
7777
--publish 5432:5432 \
7878
--volume postgresql:/var/lib/postgresql \
79-
sameersbn/postgresql:14-20230628
79+
sameersbn/postgresql:15-20230628
8080
```
8181

8282
Login to the PostgreSQL server using:
@@ -107,7 +107,7 @@ By default connections to the PostgreSQL server need to authenticated using a pa
107107
```bash
108108
docker run --name postgresql -itd --restart always \
109109
--env 'PG_TRUST_LOCALNET=true' \
110-
sameersbn/postgresql:14-20230628
110+
sameersbn/postgresql:15-20230628
111111
```
112112

113113
> **Note**
@@ -121,7 +121,7 @@ By default the `postgres` user is not assigned a password and as a result you ca
121121
```bash
122122
docker run --name postgresql -itd --restart always \
123123
--env 'PG_PASSWORD=passw0rd' \
124-
sameersbn/postgresql:14-20230628
124+
sameersbn/postgresql:15-20230628
125125
```
126126

127127

@@ -137,7 +137,7 @@ A new PostgreSQL database user can be created by specifying the `DB_USER` and `D
137137
```bash
138138
docker run --name postgresql -itd --restart always \
139139
--env 'DB_USER=dbuser' --env 'DB_PASS=dbuserpass' \
140-
sameersbn/postgresql:14-20230628
140+
sameersbn/postgresql:15-20230628
141141
```
142142

143143
> **Notes**
@@ -154,7 +154,7 @@ A new PostgreSQL database can be created by specifying the `DB_NAME` variable wh
154154
```bash
155155
docker run --name postgresql -itd --restart always \
156156
--env 'DB_NAME=dbname' \
157-
sameersbn/postgresql:14-20230628
157+
sameersbn/postgresql:15-20230628
158158
```
159159

160160
By default databases are created by copying the standard system database named `template1`. You can specify a different template for your database using the `DB_TEMPLATE` parameter. Refer to [Template Databases](http://www.postgresql.org/docs/9.4/static/manage-ag-templatedbs.html) for further information.
@@ -166,7 +166,7 @@ Additionally, more than one database can be created by specifying a comma separa
166166
```bash
167167
docker run --name postgresql -itd --restart always \
168168
--env 'DB_NAME=dbname1,dbname2' \
169-
sameersbn/postgresql:14-20230628
169+
sameersbn/postgresql:15-20230628
170170
```
171171

172172
## Granting user access to a database
@@ -177,7 +177,7 @@ If the `DB_USER` and `DB_PASS` variables are specified along with the `DB_NAME`
177177
docker run --name postgresql -itd --restart always \
178178
--env 'DB_USER=dbuser' --env 'DB_PASS=dbuserpass' \
179179
--env 'DB_NAME=dbname1,dbname2' \
180-
sameersbn/postgresql:14-20230628
180+
sameersbn/postgresql:15-20230628
181181
```
182182

183183
In the above example `dbuser` with be granted access to both the `dbname1` and `dbname2` databases.
@@ -189,7 +189,7 @@ The image also packages the [postgres contrib module](http://www.postgresql.org/
189189
```bash
190190
docker run --name postgresql -itd \
191191
--env 'DB_NAME=db1,db2' --env 'DB_EXTENSION=unaccent,pg_trgm' \
192-
sameersbn/postgresql:14-20230628
192+
sameersbn/postgresql:15-20230628
193193
```
194194

195195
The above command enables the `unaccent` and `pg_trgm` modules on the databases listed in `DB_NAME`, namely `db1` and `db2`.
@@ -205,7 +205,7 @@ Similar to the creation of a database user, a new PostgreSQL replication user ca
205205
```bash
206206
docker run --name postgresql -itd --restart always \
207207
--env 'REPLICATION_USER=repluser' --env 'REPLICATION_PASS=repluserpass' \
208-
sameersbn/postgresql:14-20230628
208+
sameersbn/postgresql:15-20230628
209209
```
210210

211211
> **Notes**
@@ -227,7 +227,7 @@ Begin by creating the master node of our cluster:
227227
docker run --name postgresql-master -itd --restart always \
228228
--env 'DB_USER=dbuser' --env 'DB_PASS=dbuserpass' --env 'DB_NAME=dbname' \
229229
--env 'REPLICATION_USER=repluser' --env 'REPLICATION_PASS=repluserpass' \
230-
sameersbn/postgresql:14-20230628
230+
sameersbn/postgresql:15-20230628
231231
```
232232

233233
Notice that no additional arguments are specified while starting the master node of the cluster.
@@ -242,7 +242,7 @@ docker run --name postgresql-slave01 -itd --restart always \
242242
--env 'REPLICATION_MODE=slave' --env 'REPLICATION_SSLMODE=prefer' \
243243
--env 'REPLICATION_HOST=master' --env 'REPLICATION_PORT=5432' \
244244
--env 'REPLICATION_USER=repluser' --env 'REPLICATION_PASS=repluserpass' \
245-
sameersbn/postgresql:14-20230628
245+
sameersbn/postgresql:15-20230628
246246
```
247247

248248
*In the above command, we used docker links so that we can address the master node using the `master` alias in `REPLICATION_HOST`.*
@@ -274,7 +274,7 @@ docker run --name postgresql-snapshot -itd --restart always \
274274
--env 'REPLICATION_MODE=snapshot' --env 'REPLICATION_SSLMODE=prefer' \
275275
--env 'REPLICATION_HOST=master' --env 'REPLICATION_PORT=5432' \
276276
--env 'REPLICATION_USER=repluser' --env 'REPLICATION_PASS=repluserpass' \
277-
sameersbn/postgresql:14-20230628
277+
sameersbn/postgresql:15-20230628
278278
```
279279

280280
The difference between a slave and a snapshot is that a slave is read-only and updated whenever the master data is updated (streaming replication), while a snapshot is read-write and is not updated after the initial snapshot of the data from the master.
@@ -296,7 +296,7 @@ docker run --name postgresql-backup -it --rm \
296296
--env 'REPLICATION_HOST=master' --env 'REPLICATION_PORT=5432' \
297297
--env 'REPLICATION_USER=repluser' --env 'REPLICATION_PASS=repluserpass' \
298298
--volume /srv/docker/backups/postgresql.$(date +%Y%m%d%H%M%S):/var/lib/postgresql \
299-
sameersbn/postgresql:14-20230628
299+
sameersbn/postgresql:15-20230628
300300
```
301301

302302
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`.
@@ -307,7 +307,7 @@ You can customize the launch command of PostgreSQL server by specifying argument
307307

308308
```bash
309309
docker run --name postgresql -itd --restart always \
310-
sameersbn/postgresql:14-20230628 -c log_connections=on
310+
sameersbn/postgresql:15-20230628 -c log_connections=on
311311
```
312312

313313
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.
@@ -318,7 +318,7 @@ By default the PostgreSQL server logs are sent to the standard output. Using the
318318

319319
```bash
320320
docker run --name postgresql -itd --restart always \
321-
sameersbn/postgresql:14-20230628 -c logging_collector=on
321+
sameersbn/postgresql:15-20230628 -c logging_collector=on
322322
```
323323

324324
To access the PostgreSQL logs you can use `docker exec`. For example:
@@ -340,7 +340,7 @@ For example, if you want to assign the `postgres` user of the container the UID
340340
```bash
341341
docker run --name postgresql -itd --restart always \
342342
--env 'USERMAP_UID=999' --env 'USERMAP_GID=999' \
343-
sameersbn/postgresql:14-20230628
343+
sameersbn/postgresql:15-20230628
344344
```
345345

346346
# Maintenance
@@ -352,7 +352,7 @@ To upgrade to newer releases:
352352
1. Download the updated Docker image:
353353

354354
```bash
355-
docker pull sameersbn/postgresql:14-20230628
355+
docker pull sameersbn/postgresql:15-20230628
356356
```
357357

358358
2. Stop the currently running image:
@@ -372,7 +372,7 @@ To upgrade to newer releases:
372372
```bash
373373
docker run --name postgresql -itd \
374374
[OPTIONS] \
375-
sameersbn/postgresql:14-20230628
375+
sameersbn/postgresql:15-20230628
376376
```
377377

378378
## Shell Access

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
14-20230628
1+
15-20230628

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
PostgreSQL:
22
restart: always
3-
image: sameersbn/postgresql:14-20230628
3+
image: sameersbn/postgresql:15-20230628
44
ports:
55
- "5432:5432"
66
environment:

0 commit comments

Comments
 (0)