services:
  web:
    #image: nginx:alpine
    image: serversideup/php:8.4-fpm-apache
    ports:
      - "80:80"
    volumes:
      - /opt/gio:/var/www/html
      - ./default.conf:/etc/apache2/apache2.conf
    depends_on:
      - php
    networks:
      - dev-network

  php:
    build:
      context: ../php
    volumes:
      - /opt/gio:/var/www/html
    networks:
      - dev-network

  mysql:
    image: mysql:8.0
    ports:
      - "3307:3306"
    environment:
      MYSQL_ROOT_PASSWORD: rootpassword
      MYSQL_DATABASE: giodev
      MYSQL_USER: giouser
      MYSQL_PASSWORD: w9Ncd68JC^gmb
    volumes:
      - mysql_data:/var/lib/mysql
    networks:
      - dev-network

  phpmyadmin:
    image: phpmyadmin/phpmyadmin
    ports:
      - "8083:80"
    environment:
      PMA_HOST: mysql
      PMA_PORT: 3306
    depends_on:
      - mysql
    networks:
      - dev-network

volumes:
  mysql_data:

networks:
  dev-network:
    driver: bridge