version: '3'

services:
  database:
    image: 'postgres:14'
    ports:
      - 15432:5432
    environment:
      POSTGRES_PASSWORD: econ
      POSTGRES_USER: admin
      POSTGRES_DB: econ
    networks:
      - postgres-network
 
  pgadmin:
      image: dpage/pgadmin4
      environment:
          PGADMIN_DEFAULT_EMAIL: admin@pgadmin.com
          PGADMIN_DEFAULT_PASSWORD: password
          PGADMIN_LISTEN_PORT: 80
      ports:
          - 15433:80
      depends_on:
          - database
networks: 
  postgres-network:
    driver: bridge