From 8db008ef0bfcb8924a44603725db6c7191905b0b Mon Sep 17 00:00:00 2001
From: Mark Monteiro <marknr.monteiro@protonmail.com>
Date: Sun, 23 Jul 2023 22:11:27 -0400
Subject: [PATCH] Remove unnecessary PG_DATA environement variable from
 docker-compose.yml (#3394)

* Remove unnecessary PG_DATA environement variable from docker-compose.yml

There is no need to set the PostgreSQL data directory to the default location, it just adds an additional unnecessary line to the docker-compose file.

In addition, the PG_DATA isn't even the correct environment variable name (it should be PGDATA, see: https://hub.docker.com/_/postgres/), so this environment variable was never doing anything to begin with.

* Update docker-compose.dev.yml

* Update docker-compose.prod.yml

* Update docker-compose.test.yml
---
 docker/docker-compose.dev.yml  | 1 -
 docker/docker-compose.prod.yml | 1 -
 docker/docker-compose.test.yml | 1 -
 docker/docker-compose.yml      | 1 -
 4 files changed, 4 deletions(-)

diff --git a/docker/docker-compose.dev.yml b/docker/docker-compose.dev.yml
index d58e01966b..0f509ad51d 100644
--- a/docker/docker-compose.dev.yml
+++ b/docker/docker-compose.dev.yml
@@ -115,7 +115,6 @@ services:
       POSTGRES_PASSWORD: ${DB_PASSWORD}
       POSTGRES_USER: ${DB_USERNAME}
       POSTGRES_DB: ${DB_DATABASE_NAME}
-      PG_DATA: /var/lib/postgresql/data
     volumes:
       - pgdata:/var/lib/postgresql/data
     ports:
diff --git a/docker/docker-compose.prod.yml b/docker/docker-compose.prod.yml
index e3223ee994..bf225d9312 100644
--- a/docker/docker-compose.prod.yml
+++ b/docker/docker-compose.prod.yml
@@ -85,7 +85,6 @@ services:
       POSTGRES_PASSWORD: ${DB_PASSWORD}
       POSTGRES_USER: ${DB_USERNAME}
       POSTGRES_DB: ${DB_DATABASE_NAME}
-      PG_DATA: /var/lib/postgresql/data
     volumes:
       - pgdata:/var/lib/postgresql/data
     restart: always
diff --git a/docker/docker-compose.test.yml b/docker/docker-compose.test.yml
index ccc187fa54..6690622915 100644
--- a/docker/docker-compose.test.yml
+++ b/docker/docker-compose.test.yml
@@ -37,7 +37,6 @@ services:
       POSTGRES_PASSWORD: ${DB_PASSWORD}
       POSTGRES_USER: ${DB_USERNAME}
       POSTGRES_DB: ${DB_DATABASE_NAME}
-      PG_DATA: /var/lib/postgresql/data
     volumes:
       - /var/lib/postgresql/data
     networks:
diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml
index 028d72b529..b5f6a47b1c 100644
--- a/docker/docker-compose.yml
+++ b/docker/docker-compose.yml
@@ -69,7 +69,6 @@ services:
       POSTGRES_PASSWORD: ${DB_PASSWORD}
       POSTGRES_USER: ${DB_USERNAME}
       POSTGRES_DB: ${DB_DATABASE_NAME}
-      PG_DATA: /var/lib/postgresql/data
     volumes:
       - pgdata:/var/lib/postgresql/data
     restart: always