version: '2'
services:
  web:
    build: .
    depends_on:
      - db
    ports:
      - "8080:8080"
    environment:
      - XWIKI_VERSION=8.4.4 
      - MYSQL_DRIVER_VERSION=5.1.38
    volumes:
      - xwiki-data:/var/lib/xwiki
  db:
    image: "mysql:5"
    volumes:
      - ./mysql/xwiki.cnf:/etc/mysql/conf.d/xwiki.cnf
      - mysql-data:/var/lib/mysql
    environment:
      MYSQL_ROOT_PASSWORD: xwiki
      MYSQL_USER: xwiki
      MYSQL_PASSWORD: xwiki
      MYSQL_DATABASE: xwiki
volumes:
  mysql-data: {}
  xwiki-data: {}
