version: '3.8'

services:
  # webserver:
  apachewebserver:
    build:
      context: .
      # dockerfile: UbuntuDockerfile
    # image: tommylau/php-5.2
    # image: devilbox/php-fpm-5.2
    # image: php:5.3.29
      dockerfile: Dockerfile_or
    environment:
      - PHP_MEMORY_LIMIT=256M
    volumes:
      - ./app:/var/www/html
      # - ./custom.conf:/usr/local/apache2/conf/custom.conf
    ports:
      - "8080:80"
    # command: apachectl -D FOREGROUND
    depends_on:
      - db

  db:
    image: mysql:5.7
    environment:
      MYSQL_ROOT_PASSWORD: NhPyzQfCITgL
      MYSQL_DATABASE: cccorgmk_db
      MYSQL_USER: cccorgmk_db
      MYSQL_PASSWORD: NhPyzQfCITgL
    volumes:
      - db_data:/var/lib/mysql

  phpmyadmin:
    image: phpmyadmin/phpmyadmin
    environment:
      - PMA_ARBITRARY=1
    ports:
      - "8181:80"
    volumes:
      - ./upload.ini:/usr/local/etc/php/conf.d/upload.ini
      - ./upload.conf:/etc/apache2/conf-enabled/upload.conf
    depends_on:
      - db

volumes:
  db_data: