### https://github.com/nextcloud/docker
## https://blog.ssdnodes.com/blog/installing-nextcloud-docker/
# https://docs.nextcloud.com/server/16/admin_manual/configuration_server/config_sample_php_parameters.html


version: '2'

volumes:
  nextcloud:
  db:

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

  app:
    image: nextcloud:apache
    container_name: nextcloud
    ports:
      - 88:80
    depends_on:
      - db
    volumes:
      - nextcloud:/var/www/html
    environment:
      - NEXTCLOUD_ADMIN_USER=Pablo
      - NEXTCLOUD_ADMIN_PASSWORD=Contraseña
      - SMTP_HOST=smtp.ehu.eus
    restart: always
