version: '3.5'

services:
  pgadmin:
    container_name: pgadmin_container
    image: dpage/pgadmin4
    environment:
      PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:-pgadmin4@pgadmin.org}
      PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-admin}
#      PGADMIN_CONFIG_SERVER_MODE: 'False'
    volumes:
       - pgadmin:/var/lib/pgadmin
    ports:
      - "${PGADMIN_PORT:-3000}:80"
    restart: unless-stopped
    logging:
      options:
        max-size: '12m'
        max-file: '5'
      driver: json-file


volumes:
  pgadmin:
    driver: local
    driver_opts:
      type: none
      device: ${PGADMIN_VOLUME}
      o: bind
