version: '3'
services:
  osm-ro-db:
    image: mysql:5
    container_name: osm-ro-db
    restart: always
    environment:
      - MYSQL_RANDOM_ROOT_PASSWORD=true
      - MYSQL_DATABASE=mano_db
      - MYSQL_USER=mano
      - MYSQL_PASSWORD=manopw
  osm-ro-ovim-db:
    image: mysql:5
    container_name: osm-ro-ovim-db
    restart: always
    environment:
      - MYSQL_RANDOM_ROOT_PASSWORD=true
      - MYSQL_DATABASE=mano_vim_db
      - MYSQL_USER=mano
      - MYSQL_PASSWORD=manopw
  osm-ro:
    build:
      context: ../
      dockerfile: docker/Dockerfile-local
    image: osm/ro
    container_name: osm-ro
    restart: always
    environment:
      - RO_DB_USER=mano
      - RO_DB_PASSWORD=manopw
      - RO_DB_NAME=mano_db
      - RO_DB_HOST=osm-ro-db
      - RO_DB_OVIM_USER=mano
      - RO_DB_OVIM_PASSWORD=manopw
      - RO_DB_OVIM_NAME=mano_vim_db
      - RO_DB_OVIM_HOST=osm-ro-ovim-db
    ports:
      - "9090:9090"
    volumes:
      - /var/log/osm/openmano/logs:/var/log/osm/openmano/logs
    depends_on:
      - osm-ro-db
      - osm-ro-ovim-db
    links:
      - osm-ro-db
      - osm-ro-ovim-db
