version: "3"

services:
  db:
    image: mysql:5.7.20
    ports:
      - "3306:3306"
    environment:
      MYSQL_ROOT_PASSWORD: "(password123)" #probably should change this
      MYSQL_DATABASE: "containerdb"
      MYSQL_USER: "user" #probably should change this
      MYSQL_PASSWORD: "user1234" #probably should change this

  web:
    image: php:7.2.9-apache
    volumes:
      - ./www:/var/www/html
      - ./configs/mods-available/:/usr/local/etc/php/modules/
      - ./configs/hostfile:/etc/apache2/sites-available
      - ./configs/inifiles:/usr/local/etc/php/conf.d
      - ./configs/shell/web-get-install.sh:/script/apache-apt.sh
    ports:
      - "8000:80"
    depends_on:
      - db
    command:
      - /script/apache-apt.sh
    working_dir: /var/www/html

  phpmyadmin:
    image: phpmyadmin/phpmyadmin
    ports:
      - "8080:80"
    depends_on:
      - db
