Skip to content

Commit 487e098

Browse files
authored
Upgrade postgres docker compose (mediacms-io#749)
* Upgrade PG to latest stable version alpine
1 parent fe7427a commit 487e098

6 files changed

+18
-12
lines changed

docker-compose-dev.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,17 @@ services:
3232
db:
3333
condition: service_healthy
3434
db:
35-
image: postgres:13
35+
image: postgres:15.2-alpine
3636
volumes:
3737
- ../postgres_data:/var/lib/postgresql/data/
3838
restart: always
3939
environment:
4040
POSTGRES_USER: mediacms
4141
POSTGRES_PASSWORD: mediacms
4242
POSTGRES_DB: mediacms
43+
TZ: Europe/London
4344
healthcheck:
44-
test: ["CMD-SHELL", "pg_isready -U mediacms"]
45+
test: ["CMD-SHELL", "pg_isready", "--host=db", "--dbname=$POSTGRES_DB", "--username=$POSTGRES_USER"]
4546
interval: 10s
4647
timeout: 5s
4748
retries: 5

docker-compose-http-proxy.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -68,16 +68,17 @@ services:
6868
depends_on:
6969
- migrations
7070
db:
71-
image: postgres:13
71+
image: postgres:15.2-alpine
7272
volumes:
7373
- ../postgres_data/:/var/lib/postgresql/data/
7474
restart: always
7575
environment:
7676
POSTGRES_USER: mediacms
7777
POSTGRES_PASSWORD: mediacms
7878
POSTGRES_DB: mediacms
79+
TZ: Europe/London
7980
healthcheck:
80-
test: ["CMD-SHELL", "pg_isready -U mediacms"]
81+
test: ["CMD-SHELL", "pg_isready", "--host=db", "--dbname=$POSTGRES_DB", "--username=$POSTGRES_USER"]
8182
interval: 10s
8283
timeout: 5s
8384
retries: 5

docker-compose-https-proxy.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,17 @@ services:
7070
depends_on:
7171
- migrations
7272
db:
73-
image: postgres:13
73+
image: postgres:15.2-alpine
7474
volumes:
7575
- ../postgres_data/:/var/lib/postgresql/data/
7676
restart: always
7777
environment:
7878
POSTGRES_USER: mediacms
7979
POSTGRES_PASSWORD: mediacms
8080
POSTGRES_DB: mediacms
81+
TZ: Europe/London
8182
healthcheck:
82-
test: ["CMD-SHELL", "pg_isready -U mediacms"]
83+
test: ["CMD-SHELL", "pg_isready", "--host=db", "--dbname=$POSTGRES_DB", "--username=$POSTGRES_USER"]
8384
interval: 10s
8485
timeout: 5s
8586
retries: 5

docker-compose-letsencrypt.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -90,16 +90,17 @@ services:
9090
depends_on:
9191
- migrations
9292
db:
93-
image: postgres:13
93+
image: postgres:15.2-alpine
9494
volumes:
9595
- ../postgres_data:/var/lib/postgresql/data/
9696
restart: always
9797
environment:
9898
POSTGRES_USER: mediacms
9999
POSTGRES_PASSWORD: mediacms
100100
POSTGRES_DB: mediacms
101+
TZ: Europe/London
101102
healthcheck:
102-
test: ["CMD-SHELL", "pg_isready -U mediacms"]
103+
test: ["CMD-SHELL", "pg_isready", "--host=db", "--dbname=$POSTGRES_DB", "--username=$POSTGRES_USER"]
103104
interval: 30s
104105
timeout: 10s
105106
retries: 5

docker-compose-named-volumes.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,17 @@ services:
6666
depends_on:
6767
- migrations
6868
db:
69-
image: postgres:13
69+
image: postgres:15.2-alpine
7070
volumes:
7171
- postgres_data:/var/lib/postgresql/data/
7272
restart: always
7373
environment:
7474
POSTGRES_USER: mediacms
7575
POSTGRES_PASSWORD: mediacms
7676
POSTGRES_DB: mediacms
77+
TZ: Europe/London
7778
healthcheck:
78-
test: ["CMD-SHELL", "pg_isready -U mediacms"]
79+
test: ["CMD-SHELL", "pg_isready", "--host=db", "--dbname=$POSTGRES_DB", "--username=$POSTGRES_USER"]
7980
interval: 30s
8081
timeout: 10s
8182
retries: 5

docker-compose.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,17 @@ services:
6262
depends_on:
6363
- migrations
6464
db:
65-
image: postgres:13
65+
image: postgres:15.2-alpine
6666
volumes:
6767
- ../postgres_data:/var/lib/postgresql/data/
6868
restart: always
6969
environment:
7070
POSTGRES_USER: mediacms
7171
POSTGRES_PASSWORD: mediacms
7272
POSTGRES_DB: mediacms
73+
TZ: Europe/London
7374
healthcheck:
74-
test: ["CMD-SHELL", "pg_isready -U mediacms"]
75+
test: ["CMD-SHELL", "pg_isready", "--host=db", "--dbname=$POSTGRES_DB", "--username=$POSTGRES_USER"]
7576
interval: 10s
7677
timeout: 5s
7778
retries: 5

0 commit comments

Comments
 (0)