version: '3.8'

services:
  web:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: supportboard-web
    ports:
      - "8080:80"
    volumes:
      - .:/var/www/html
      - ./docker/php/php.ini:/usr/local/etc/php/php.ini
    depends_on:
      - db
    environment:
      - APACHE_DOCUMENT_ROOT=/var/www/html
    networks:
      - supportboard-network
    restart: unless-stopped

  db:
    image: mysql:8.0
    container_name: supportboard-db
    ports:
      - "3316:3306"
    environment:
      MYSQL_ROOT_PASSWORD: hxG^Mj@zd78e%^2fqK
      MYSQL_DATABASE: supportboard
      MYSQL_USER: supportboard
      MYSQL_PASSWORD: hxG^Mj@zd78e%^2fqK
    volumes:
      - db_data:/var/lib/mysql
      - ./docker/mysql/my.cnf:/etc/mysql/conf.d/custom.cnf
    networks:
      - supportboard-network
    restart: unless-stopped
    command: --default-authentication-plugin=mysql_native_password

volumes:
  db_data:

networks:
  supportboard-network:
    driver: bridge



