version: "3.9"

services:
  php:
    build:
      context: .
      dockerfile: Dockerfile.php
    container_name: my_php
    volumes:
      - ./revivepac:/var/www/html

  apache:
    build:
      context: .
      dockerfile: Dockerfile.apache
    container_name: my_apache
    ports:
      - "80:8080"
    volumes:
      - ./apachedomain.conf:/usr/local/apache2/conf/extra/httpd-vhosts.conf
      - ./revivepac:/var/www/html
    depends_on:
      - php
  
  mysql:
    build:
      context: .
      dockerfile: Dockerfile.mysql
    container_name: my_mysql
    environment:
      MYSQL_ROOT_PASSWORD: hsy__admins
      MYSQL_DATABASE: revive
    volumes:
      - mysql-data:/var/lib/mysql
    ports:
      - "3306:3306"

volumes:
  mysql-data:

