version: '3.3'
services:
  xwiki-web:
    image: xwiki:14.10.1-mysql-tomcat
    environment:
      - DB_USER=xwiki
      - DB_PASSWORD=X7HZPrEeSY43VDjk
      - DB_DATABASE=xwiki
      - DB_HOST=xwiki-db
    ports:
      - "8080:8080"
  xwiki-db:
    image: mysql:5.7.40
    environment:
      - MYSQL_ROOT_PASSWORD=THISISMYPASSWORD
      - MYSQL_USER=xwiki
      - MYSQL_PASSWORD=X7HZPrEeSY43VDjk
      - MYSQL_DATABASE=xwiki
    configs: 
      - source: mysql-config
        target: /etc/mysql/conf.d/xwiki.cnf

configs:
  mysql-config:
    external:
      name: xwiki-mysql-config
