version: "3.1"
services:
  mysql:
    image: mysql:5.7
    container_name: booked-database
    volumes:
      - ./mysql:/var/lib/mysql
    environment:
      - MYSQL_DATABASE=bookedscheduler
      - MYSQL_ROOT_PASSWORD=myrootpassword
      - MYSQL_USER=booked_user
      - MYSQL_PASSWORD=mypassword
    networks:
      - booked-network

  server:
    build: .
    image: booked-server:v1
    container_name: booked-server
    ports:
      - "8080:80"
    volumes:
      - ../:/var/www/html
      # - ./php.ini:/usr/local/etc/php/conf.d/99-overrides.ini
    networks:
      - booked-network

networks:
  booked-network:
    driver: bridge
