From b692f5dbf8c3873ec4c374218cf9fead6baa6410 Mon Sep 17 00:00:00 2001 From: arcbjorn Date: Mon, 24 Oct 2022 02:13:01 -0300 Subject: [PATCH] feat(pgSQL): add docker-compose with pgAdmin --- postgresql/docker-compose.yaml | 44 ++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 postgresql/docker-compose.yaml diff --git a/postgresql/docker-compose.yaml b/postgresql/docker-compose.yaml new file mode 100644 index 0000000..fa1e09a --- /dev/null +++ b/postgresql/docker-compose.yaml @@ -0,0 +1,44 @@ +version: 3.8 + +services: + postgresql: + image: postgresql:latest + container_name: postgresql + name: postgresql + + restart: always + + ports: + - "${POSTGRES_PORT}:5432" + networks: + - postgresql-network + environment: + - stack.env + volumes: + - /root/containers/postgresql/docker-postgresql-multiple-databases:/docker-entrypoint-initdb.d + - /root/containers/postgresql/data:/var/lib/postgresql/ + + pgadmin: + image: dpage/pgadmin4 + container_name: pgadmin + name: pgadmin + + restart: always + + environment: + - stack.env + + ports: + - "${PGADMIN_PORT}:80" + volumes: + - /root/containers/pgadmin/data:/var/lib/pgadmin + depends_on: + - postgresql + +volumes: + postgresql: + name: postgresql + +networks: + postgresql-network: + name: postgresql-network