---
version: "3"

services:

  element:
    build: element
    restart: always
    ports:
      - 8080:80

  hedgedoc:
    build: hedgedoc
    restart: always
    environment:
      CMD_DB_URL: "${CODIMD_DB_URL}"
      CMD_LDAP_BINDCREDENTIALS: "${CODIMD_LDAP_BINDCREDENTIALS}"
    volumes:
      - ./codimd_uploads_data:/hedgedoc/public/uploads
    ports:
      - 8081:3000

  privatebin:
    image: privatebin/nginx-fpm-alpine:1.3.4
    restart: always
    volumes:
      - ./privatebin_data:/srv/data
    ports:
      - 8083:8080

  etherpad:
    build: etherpad
    restart: always
    environment:
      POSTGRES_PASSWORD: "${ETHERPAD_DB_PASSWORD}"
    ports:
      - 8084:9001

  cas:
    build: django-cas-server
    restart: always
    environment:
      DJANGO_DB_PASSWORD: "${DJANGO_CAS_DB_PASSWORD}"
      DJANGO_SECRET_KEY: "${DJANGO_CAS_SECRET_KEY}"
      DJANGO_CAS_LDAP_PASSWORD: "${DJANGO_CAS_LDAP_PASSWORD}"
    ports:
      - 8085:8000

  statping:
    image: statping/statping:v0.90.74
    restart: always
    environment:
      DB_CONN: sqlite
    volumes:
      - ./statping_data:/app
    ports:
      - 8086:8080

  docker_exporter:
    image: prometheusnet/docker_exporter
    restart: always
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
    ports:
      - "8087:9417"

  kanboard:
    image: kanboard/kanboard:v1.2.18
    environment:
      LDAP_AUTH: "true"
      LDAP_SERVER: ldap://10.128.0.149
      LDAP_BIND_TYPE: proxy
      LDAP_USERNAME: "cn=kanboard,ou=service-users,dc=auro,dc=re"
      LDAP_PASSWORD: "${KANBOARD_LDAP_PASSWORD}"
      LDAP_USER_BASE_DN: "cn=Utilisateurs,dc=auro,dc=re"
      LDAP_USER_FILTER: "(&(objectClass=posixAccount)(uid=%s))"
      LDAP_GROUP_PROVIDER: "false"
      DB_DRIVER: postgres
      DB_HOSTNAME: 10.128.0.96
      DB_NAME: kanboard
      DB_USERNAME: kanboard
      DB_PASSWORD: "${KANBOARD_DB_PASSWORD}"
      ENABLE_XFRAME: "false"
      DEBUG: "false"
    volumes:
      - ./kanboard_data:/var/www/app/data
      - ./kanboard_plugins:/var/www/app/plugins
    ports:
      - 8088:80

  keycloak:
    image: quay.io/keycloak/keycloak
    environment:
      DB_VENDOR: postgres
      DB_ADDR: 10.128.0.96
      DB_DATABASE: keycloak
      DB_USER: keycloak
      DB_PASSWORD: "${KEYCLOAK_DB_PASSWORD}"
      KEYCLOAK_FRONTEND_URL: "https://auth.auro.re/auth"
    volumes:
      - ./keycloak_aurore_theme:/opt/jboss/keycloak/themes/aurore:ro
    ports:
      - 8089:8080

  kanbot:
    build: kanbot
    restart: always
    volumes:
      - ./kanbot_config/config.yaml:/var/www/kanbot/config.yaml:ro

  matrix-appservice-discord:
    image: halfshot/matrix-appservice-discord:v1.0.0
    restart: always
    volumes:
      - ./matrix-appservice-discord_data:/data
      - ./matrix-appservice-discord_data/discord.db:/discord.db
    ports:
      - 9005:9005

  prometheus-alertmanager:
    build: prometheus-alertmanager
    restart: always
    ports:
      - 9093:9093

  prometheus-alertmanager-discord:
    build: prometheus-alertmanager-discord
    restart: always
    environment:
      DISCORD_WEBHOOK: "${PROMETHEUS_DISCORD_WEBHOOK}"
...
