version: "2"
services:
  opendc:
    build: ./
    image: opendc
    ports:
      - "8081:8081"
    links:
      - mariadb
    depends_on:
      - mariadb
    environment:
      - MYSQL_DATABASE=opendc
      - MYSQL_USER=opendc
      - MYSQL_PASSWORD=opendcpassword
  opendc-simulator:
    build: ./opendc-simulator
    environment:
      - MYSQL_DATABASE=opendc
      - MYSQL_USER=opendc
      - MYSQL_PASSWORD=opendcpassword
  mariadb:
    image: mariadb:10.1
    ports:
      - "3306:3306" # comment this line out in production
    environment:
      - MYSQL_DATABASE=opendc
      - MYSQL_USER=opendc
      - MYSQL_PASSWORD=opendcpassword
      - MYSQL_RANDOM_ROOT_PASSWORD=yes
    # uncomment in production
    # volumes:
    #   - "/data/mariadb:/var/lib/mysql"

version: "2"
services:
  opendc:
    build: ./
    image: opendc
    ports:
      - "8081:8081"
    links:
      - mariadb
    depends_on:
      - mariadb
    environment:
      - MYSQL_DATABASE=opendc
      - MYSQL_USER=opendc
      - MYSQL_PASSWORD=opendcpassword
  opendc-simulator:
    build: ./opendc-simulator
    environment:
      - PERSISTENCE_URL=jdbc:mysql://mariadb:3306/opendc
      - PERSISTENCE_USER=opendc
      - PERSISTENCE_PASSWORD=opendcpassword
  mariadb:
    image: mariadb:10.1
    ports:
      - "3306:3306" # comment this line out in production
    environment:
      - MYSQL_DATABASE=opendc
      - MYSQL_USER=opendc
      - MYSQL_PASSWORD=opendcpassword
      - MYSQL_RANDOM_ROOT_PASSWORD=yes
    # uncomment in production
    # volumes:
    #   - "/data/mariadb:/var/lib/mysql"

Fix Docker configuration for simulator
Fix Docker configuration for simulator

This change fixes the Docker configuration for the simulator, in
particular the database configuration for the simulator.
