version: '3.8'
services:
  pgadmin:
    image: dpage/pgadmin4
    container_name: pgadmin4
    restart: always
    ports:
      - 5431:80
    environment:
      - PGADMIN_DEFAULT_EMAIL=mizz@mizz.com
      - PGADMIN_DEFAULT_PASSWORD=mizz
    volumes:
      - pgadmin-data:/var/lib/pgadmin

  postgres:
    image: postgres:latest
    ports:
      - 5432:5432
    volumes:
      - ~/apps/postgres:/var/lib/postgresql/data
    environment:
      - POSTGRES_PASSWORD=root
      - POSTGRES_USER=root
      - POSTGRES_DB=classku
volumes:
  pgadmin-data: