
services:

  app:
    build: .
    container_name: azcare_app
    working_dir: /var/www
    volumes:
      - .:/var/www
    depends_on:
      - db

  web:
    image: nginx:latest
    container_name: azcare_nginx
    ports:
      - "8000:80"
    volumes:
      - .:/var/www
      - ./docker/nginx.conf:/etc/nginx/conf.d/default.conf
    depends_on:
      - app

  db:
    image: mysql:8.0
    container_name: azcare_mysql
    environment:
      MYSQL_ROOT_PASSWORD: root
      MYSQL_DATABASE: azcare
      MYSQL_USER: azcare
      MYSQL_PASSWORD: secret
    ports:
      - "3307:3306"
    volumes:
      - mysql-data:/var/lib/mysql

volumes:
  mysql-data: