#version: '3.7'
services:
  php-apache2:
    container_name: php-apache2
    user: www-data:www-data
    build:
      context: ./php
      dockerfile: Dockerfile
    restart: always
    depends_on:
      - db
    volumes:
      - ./app:/var/www/html/
    ports:
      - 80:80
    environment:
        - TZ=Europe/Moscow
  db:
    container_name: db
    image: postgres:15
    restart: always
    environment:
        POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
        POSTGRES_DB: ${POSTGRES_DB}
        POSTGRES_USER: ${POSTGRES_USER}
    volumes:
      - ./postgres/data:/var/lib/postgresql/data
  pgadmin:
    container_name: pgadmin
    image: dpage/pgadmin4
    restart: always
    depends_on:
      - db
    environment:
      PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL}
      PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD}
    ports:
      - 8080:80
      
      
#sudo chmod -R 777 /home/andrey/docker_pap/app     
#composer create-project laravel/laravel .
#composer require barryvdh/laravel-debugbar --dev

