version: "2"
services:
  flaskfetfotos:
    image: docker.fet.at/flask-fet-fotos:latest
    environment:
     FLASK_DEBUG: 0
     FLASK_APP: main.py
     pages_root: /app/data
  etherpadsql:
    image: mariadb
    environment:
      MYSQL_DATABASE: etherpaddb
      MYSQL_USER: user
      MYSQL_PASSWORD: hgu
      MYSQL_COLLATION: utf8_general_ci
      MYSQL_CHARSET: utf8
    volumes:
     - ep-mysql:/var/lib/mysql
  etherpad:
    image: etherpad/etherpad
    environment:
      DB_TYPE: mysql
      DB_HOST: etherpadsql
      DB_PORT: 3306
      DB_NAME: etherpaddb
      DB_USER: user
      DB_PASS: hgu
      DB_CHARSET: utf8
      TRUST_PROXY: "true"
      REQUIRE_SESSION: "true"
    depends_on:
      - etherpadsql
    volumes:
     - /srv/etherpad/APIKEY.txt:/opt/etherpad-lite/APIKEY.txt
  theia:
    image: docker.fet.at/theia-fet2020:latest
    volumes:
      - dev_data:/home/project
      -  /srv/etherpad/APIKEY.txt:/srv/etherpad/APIKEY.txt
      - theia_usr:/usr/local
    environment:
      HOST_NAME: '${HOSTNAME}'
  nginx:
    image: docker.fet.at/nginxdev-fet2020:latest
    ports:
      - '${PORT}:8080'
volumes:
  ep-mysql:
    driver: local
  theia_usr:
    driver: local
  dev_data:
    driver: local