version: '3'
services:
  app:
    image: joselfonsecadt/nginx-php7.4-dev:latest
    working_dir: /var/www/html
    volumes:
        - ./:/var/www/html
    ports:
        - 80:80
    networks:
        - api
  scheduler:
    image: joselfonsecadt/nginx-php7.4-dev:latest
    command: ./var/www/html/bin/run-scheduler.sh
    volumes:
        - ./:/var/www/html
    networks:
        - api
  mysql:
    image: mysql:8.0
    environment:
       MYSQL_ROOT_PASSWORD: secret
       MYSQL_DATABASE: api
    volumes:
        - ./docker/mysql/data/:/var/lib/mysql
    ports:
        - 3306:3306
    networks:
        - api
networks:
  api:
    driver: bridge
