version: "3.4"

services:
  monicahq:
    build: .
    image: monicahq/monicahq
    depends_on:
      - mysql
    ports:
      - 80:80
    env_file: .env
    volumes:
      - monica_data:/var/www/monica/storage
    restart: always

  mysql:
    image: mysql:5.7
    environment:
      - MYSQL_ROOT_PASSWORD=sekret_root_password
      - MYSQL_DATABASE=monica
      - MYSQL_USER=homestead
      - MYSQL_PASSWORD=secret
    volumes:
      - monica_mysql:/var/lib/mysql
    restart: always

volumes:
  monica_data:
    name: monica_data
  monica_mysql:
    name: monica_mysql
