[PATCH 5/6] docker-compose: Remove 'links' section

Stephen Finucane stephen at that.guru
Wed Apr 25 07:05:40 AEST 2018


This is no longer needed as the service name is also the host names in
v2 syntax [1].

[1] https://docs.docker.com/compose/networking/

Signed-off-by: Stephen Finucane <stephen at that.guru>
---
 docker-compose-pg.yml | 7 ++-----
 docker-compose.yml    | 4 ----
 2 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/docker-compose-pg.yml b/docker-compose-pg.yml
index e403547c..81e0fda5 100644
--- a/docker-compose-pg.yml
+++ b/docker-compose-pg.yml
@@ -6,6 +6,8 @@ services:
       - ./tools/docker/db/postdata:/var/lib/postgresql/data
     environment:
       - POSTGRES_PASSWORD=password
+      - PGUSER=postgres
+      - PGPASSWORD=password
 
   web:
     build:
@@ -18,13 +20,8 @@ services:
       - .:/home/patchwork/patchwork/
     ports:
       - "8000:8000"
-    # TODO(stephenfin): links are deprecated and should be replaced
-    # with user-defined networks
-    links:
-      - db
     environment:
       - UID
-      - PGPASSWORD=password
       - PW_TEST_DB_HOST=db
       - PW_TEST_DB_PORT=5432
       - PW_TEST_DB_TYPE=postgres
diff --git a/docker-compose.yml b/docker-compose.yml
index 18d60b7b..46c86766 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -20,10 +20,6 @@ services:
       - .:/home/patchwork/patchwork/
     ports:
       - "8000:8000"
-    # TODO(stephenfin): links are deprecated and should be replaced
-    # with user-defined networks
-    links:
-      - db
     environment:
       - UID
       - PW_TEST_DB_HOST=db
-- 
2.14.3



More information about the Patchwork mailing list