services:
  app:
    build: .
    ports:
      - "8080:80"
    volumes:
      - ./:/var/www/html
    depends_on:
      - db
    environment:
      APACHE_DOCUMENT_ROOT: /var/www/html/public
  db:
    image: mariadb:11
    restart: unless-stopped
    environment:
      MYSQL_ROOT_PASSWORD: root_password
      MYSQL_DATABASE: qr_order
      MYSQL_USER: qr_order
      MYSQL_PASSWORD: qr_order_password
    ports:
      - "3307:3306"
    volumes:
      - dbdata:/var/lib/mysql
volumes:
  dbdata:
