version: '2'

services:
  mariadb:
    image: docker.io/bitnami/mariadb:10.6
    environment:
      - MARIADB_USER=exam
      - MARIADB_PASSWORD=exam
      - MARIADB_DATABASE=exam
      - MARIADB_ROOT_PASSWORD=exam
    volumes:
      - 'db-data:/bitnami/mariadb'
  quiz:
    build:
      context: .
    ports:
      - '80:80'
    environment:
      - DB_HOST=mariadb
      - DB_USERNAME=exam
      - DB_NAME=exam
      - DB_PASSWORD=exam
      - DOMAINNAME=192.168.11.108
    depends_on:
      - mariadb

volumes:
  db-data:
