version: '2'

volumes:
  nextcloud:
  db:

services:
  db:
    image: mariadb
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
    restart: always
    volumes:
      - db:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=bajoures
      - MYSQL_PASSWORD=bajoures
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud

  app:
    image: nextcloud
    ports:
      - 8081:80
    links:
      - db
    volumes:
      - nextcloud:/var/www/maxcrm
    restart: always
    environment:
      - NEXTCLOUD_TRUSTED_DOMAINS=nextcloud1.eae.pt
