version: '3.3'

services:
  db:
    image: mariadb:latest
    command: --default-authentication-plugin=mysql_native_password
    volumes:
      - db_data:/var/lib/mysql
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: root
      MYSQL_USER: allerta
      MYSQL_PASSWORD: password
      MYSQL_DATABASE: allerta-db
  allerta:
    depends_on:
      - db
    links:
      - db:db
    image: allertavvf/allertavvf
    build: ./
    ports:
      - "8081:8080"
    restart: always
    environment:
      DB_HOST: db
      DB_USERNAME: root
      DB_PASSWORD: root
      DB_NAME: allerta-db
volumes:
  db_data: {}