From 460a4d60234383d91a66fa34da643398a075fe38 Mon Sep 17 00:00:00 2001 From: Jared Smith Date: Wed, 15 Jun 2022 17:45:06 +1000 Subject: [PATCH] add postgres --- postgres/.env | 4 ++++ postgres/docker-compose.yml | 28 ++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 postgres/.env create mode 100644 postgres/docker-compose.yml diff --git a/postgres/.env b/postgres/.env new file mode 100644 index 0000000..c2f144a --- /dev/null +++ b/postgres/.env @@ -0,0 +1,4 @@ +DB_USER=dev +DB_PASSWORD=Sprite-Marmalade-Freight-Immunize +ADMIN_USER=admin@jaredtsmith.com +ADMIN_PASSWORD=QV^dT9XXgiUM \ No newline at end of file diff --git a/postgres/docker-compose.yml b/postgres/docker-compose.yml new file mode 100644 index 0000000..429ff51 --- /dev/null +++ b/postgres/docker-compose.yml @@ -0,0 +1,28 @@ +version: "3.7" +services: + db: + image: postgres:latest + restart: always + environment: + POSTGRES_DB: postgres + POSTGRES_USER: ${DB_USER} + POSTGRES_PASSWORD: ${DB_PASSWORD} + PGDATA: /var/lib/postgresql/data + volumes: + - /var/postgres-data:/var/lib/postgresql/data + ports: + - "5432:5432" + + pgadmin: + image: tobi312/pgadmin4:latest + restart: always + environment: + PGADMIN_DEFAULT_EMAIL: ${ADMIN_USER} + PGADMIN_DEFAULT_PASSWORD: ${ADMIN_PASSWORD} + PGADMIN_LISTEN_PORT: 80 + ports: + - "8081:80" + volumes: + - /var/pgadmin-data:/var/lib/pgadmin + links: + - "db:pgsql-server"