fix: use version 3.8 of the Docker Compose specification

See also the Compose and Docker compatibility matrix [1].

While at it, reorder top-level configuration elements and
separate each by a blank line to enhance readability.

[1] https://docs.docker.com/compose/compose-file/compose-file-v3/#compose-and-docker-compatibility-matrix
This commit is contained in:
Christoph Schug 2024-03-02 15:39:32 +01:00
parent 989a080d16
commit 591ec21010

View File

@ -1,10 +1,6 @@
---
# (Optional) when using custom network
# networks:
# yournetwork:
# external: true
volumes:
postgres-data:
version: "3.8"
services:
postgres:
# (Recommended) replace "latest" with specific version
@ -20,5 +16,13 @@ services:
# networks:
# - yournetwork
volumes:
- postgres-data:/var/lib/postgresql/data
- postgres_data:/var/lib/postgresql/data
restart: unless-stopped
# (Optional) when using custom network
# networks:
# yournetwork:
# external: true
volumes:
postgres_data: