services:
  postgres:
    container_name: learnlytics-pg
    image: postgres
    hostname: localhost
    ports:
      - "5432:5432"
    environment:
      POSTGRES_USER: admin
      POSTGRES_PASSWORD: admin
      POSTGRES_DB: learnlytics
    volumes:
      - postgres-data:/var/lib/postgresql/data
    restart: unless-stopped
  
  pgadmin:
    container_name: learnlytics-pgadmin 
    image: dpage/pgadmin4
    depends_on:
      - postgres
    ports:
      - "80:80"
    environment:
      PGADMIN_DEFAULT_EMAIL: admin@learnlytics.de
      PGADMIN_DEFAULT_PASSWORD: admin
    restart: unless-stopped

volumes:
  postgres-data:
