version: '3'

services:
  bcp-mysql:
    image: mysql:5.7
    environment:
      - MYSQL_ROOT_PASSWORD=password
      - MYSQL_DATABASE=bcp
      - MYSQL_USER=root
      - MYSQL_PASSWORD=password
    ports:
      - 3307:3306

  app:
    build: .
    ports:
       - 9097:9097
    environment:
      SPRING_DATASOURCE_URL: jdbc:mysql://bcp-mysql:3306/bcp?autoReconnect=true&useSSL=false
    depends_on:
       - bcp-mysql