#
services:
  laravel-docker:
    container_name: laravel-app
    build: .
    volumes:
      - ./:/var/www/html
      - /var/www/html/vendor 
    ports:
      - 80:80
    depends_on:
     - postgres

  postgres:
      image: postgres:13
      container_name: postgres
      restart: unless-stopped
      volumes:
        - pg_data:/var/lib/postgresql/data
      environment:
        POSTGRES_DB: ${DB_DATABASE}
        POSTGRES_USER: ${DB_USERNAME}
        POSTGRES_PASSWORD: ${DB_PASSWORD}
      ports:
       - 5433:5432

      
  pgadmin:
    image: dpage/pgadmin4:latest
    container_name: pgadmin
    restart: unless-stopped
    environment:
      PGADMIN_DEFAULT_EMAIL: admin@admin.com
      PGADMIN_DEFAULT_PASSWORD: ${DB_PASSWORD}
      PGADMIN_LISTEN_PORT: 5050
    ports:
      - "5050:5050"
      


volumes:
  pg_data: ~
  phpmyadmin_data: