version: "3"
services:
  db:
    ports:
      - 5432:5432
    environment:
      - WILDFLY_DATABASES=app:app_user:apppassword,security:security_user:secpassword,jbpm:jbpm:jbpmpassword

  webbpm-app:
    env_file:
      - testing.env

  selenoid:
    network_mode: bridge
    image: aerokube/selenoid:latest-release
    container_name: "selenoid"
    environment:
      - OVERRIDE_VIDEO_OUTPUT_DIR=$PWD/video
    volumes:
      - "$PWD:/etc/selenoid/:ro"
      - "/var/run/docker.sock:/var/run/docker.sock"
      - "$PWD/logs:/opt/selenoid/logs/"
      - "$PWD/video/:/opt/selenoid/video/"
    command: -session-attempt-timeout 1m -retry-count 3 -limit ${LIMIT:-4} -save-all-logs -log-output-dir /opt/selenoid/logs -video-output-dir /opt/selenoid/video
    ports:
      - "4444:4444"
    depends_on:
      - webbpm-app

  selenoid-ui:
    image: aerokube/selenoid-ui
    container_name: "selenoid-ui"
    network_mode: bridge
    depends_on:
      - selenoid
    links:
      - "selenoid:selenoid"
    ports:
      - "8080:8080"
    command: --selenoid-uri http://selenoid:4444

