services:
  app:
    build: .
    volumes:
      - ./:/var/www/html
    depends_on:
      - mysql
  nginx:
    image: nginx:alpine
    ports:
      - "8080:80"
    volumes:
      - ./:/var/www/html
      - ./docker/nginx.conf:/etc/nginx/conf.d/default.conf
    depends_on:
      - app
  mysql:
    image: mysql:8.0
    environment:
      MYSQL_DATABASE: dpsvr
      MYSQL_USER: dpsvr
      MYSQL_PASSWORD: dpsvr_password
      MYSQL_ROOT_PASSWORD: root_password
    ports:
      - "33060:3306"
    volumes:
      - mysql_data:/var/lib/mysql
volumes:
  mysql_data:
