version: '3.8'

services:

  openmeetings:
    image: apache/openmeetings:min-6.3.0
    ports:
      - "5080:5080"
    volumes:
      - ./data/omdata:/opt/omdata
    environment:
      - OM_KURENTO_WS_URL=ws://kurento:8888/kurento
      - OM_DB_TYPE=postgresql
      - OM_DB_HOST=postgresql
      - OM_DB_PORT=5432
      - OM_DB_USER=openmeetings
      - OM_DB_PASS=openmeetings
      - OM_DB_NAME=openmeetings
    depends_on:
      - kurento
      - postgresql
    restart: unless-stopped

  kurento:
    image: kurento/kurento-media-server:6
    ports:
      - "8888:8888"
    restart: unless-stopped

  postgresql:
    image: postgres:15-alpine
    volumes:
      - ./data/postgresql:/var/lib/postgresql/data
    environment:
      - POSTGRES_USER=openmeetings
      - POSTGRES_PASSWORD=openmeetings
      - POSTGRES_DB=openmeetings
    restart: unless-stopped
  
# mysql:
#   image: mysql
#   volumes:
#     - ./data/mysql:/var/lib/mysql
#   environment:
#     - MYSQL_ROOT_PASSWORD=root
#     - MYSQL_USER=openmeetings
#     - MYSQL_PASSWORD=openmeetings
#     - MYSQL_DATABASE=openmeetings
#   restart: unless-stopped
