Explorar o código

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
Christoph Schug %!s(int64=2) %!d(string=hai) anos
pai
achega
591ec21010
Modificáronse 1 ficheiros con 11 adicións e 7 borrados
  1. 11 7
      docker-compose/postgres/docker-compose.yaml

+ 11 - 7
docker-compose/postgres/docker-compose.yaml

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