version: "3"
services:
  web:
    image: tomcat:8-alpine
    volumes:
      - ./out/artifacts/eshop_war/eshop_war.war:/usr/local/tomcat/webapps/eshop.war
    ports:
      - 8080:8080

  db:
    image: mysql:5.6
    environment:
      - MYSQL_ROOT_PASSWORD=GaoDi0906
      - MYSQL_DATABASE=eshop
    ports:
      - 3306:3306
    volumes:
      - ./eshop.sql:/docker-entrypoint-initdb.d/eshop.sql