Skip to content

Commit 6cbc241

Browse files
committed
officially support postgres 18, add docs for volume mount change
1 parent 9d94d7e commit 6cbc241

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

lib/teslamate/database_check.ex

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ defmodule TeslaMate.DatabaseCheck do
88

99
@version_requirements %{
1010
1600 => %{min_version: "16.7", min_version_num: 160_007},
11-
1700 => %{min_version: "17.3", min_version_num: 170_003}
11+
1700 => %{min_version: "17.3", min_version_num: 170_003},
12+
1800 => %{min_version: "18.0", min_version_num: 180_000}
1213
}
1314

1415
def check_postgres_version do
@@ -49,7 +50,7 @@ defmodule TeslaMate.DatabaseCheck do
4950
version_num: version_num
5051
}) do
5152
cond do
52-
major > 1700 ->
53+
major > 1800 ->
5354
IO.puts(
5455
"PostgreSQL version #{version} is not officially tested or supported yet. Use at your own risk."
5556
)

website/docs/installation/docker.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ Alternatively, you can use a reverse proxy (such as Traefik, Apache2 or Caddy) w
4040
- all
4141

4242
database:
43-
image: postgres:17
43+
image: postgres:18
4444
restart: always
4545
environment:
4646
- POSTGRES_USER=teslamate
4747
- POSTGRES_PASSWORD=password #insert your secure database password!
4848
- POSTGRES_DB=teslamate
4949
volumes:
50-
- teslamate-db:/var/lib/postgresql/data
50+
- teslamate-db:/var/lib/postgresql
5151

5252
grafana:
5353
image: teslamate/grafana:latest

website/docs/maintenance/upgrading_postgres.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,18 @@ sidebar_label: Upgrading PostgreSQL
2323
image: postgres:xx
2424
```
2525
26+
:::warning
27+
When upgrading postgres to `postgres:18` ensure to change the volume mount as well!
28+
29+
```yml {2}
30+
database:
31+
volumes:
32+
- teslamate-db:/var/lib/postgresql
33+
```
34+
35+
details: https://hub.docker.com/_/postgres#pgdata
36+
:::
37+
2638
```bash
2739
docker compose up -d database
2840
```

0 commit comments

Comments
 (0)