version: '3'

services:
  database:
    container_name: aa-integration-simmonsbank-pg-db
    image: 'postgres:15'
    ports:
      - 25432:5432
    env_file:
      - .env
    networks:
      - postgres-network
    volumes:
      - ./pg-db_data/:/var/lib/postgresql/data/
      - ./init.sql:/docker-entrypoint-initdb.d/init.sql

  management_interface:
    container_name: aa-integration-simmonsbank-pg-admin
    image: 'dpage/pgadmin4:7.1'
    ports:
      - 25433:80
    env_file:
      - .env
    depends_on:
      - database
    networks:
      - postgres-network
    volumes:
      - ./pg-admin_data/:/var/lib/pgadmin/

networks:
  postgres-network:
    driver: bridge
