version: '3'
services:
  pwman:
    depends_on:
     - mysql
    image: oz123/pwman3
    volumes:
    - .:/code
    environment:
     - MONGOHOST=mongodb
     - MYSQLHOST=mysql
     - POSTGRESHOST=postgresql
  mysql:
    image: "mysql:5.7"
    environment:
     -  MYSQL_ROOT_PASSWORD=toor
     -  MYSQL_DATABASE=pwmantest
     -  MYSQL_USER=pwman
     -  MYSQL_PASSWORD=123456
  postgresql:
    image: "postgres:alpine"
    environment:
     - POSTGRES_USER=tester
     - POSTGRES_PASSWORD=123456
     - POSTGRES_DB=pwman
  mongodb:
    image: "mongo:3.6"
    environment:
     - MONGO_INITDB_DATABASE=pwmantest
    volumes:
    - ./tests/init_mongo.js:/docker-entrypoint-initdb.d/init.js

