version: "3.7"
services:
  app:
    build:
      args:
        user: qualee
        uid: 1000
      context: ./
      dockerfile: Dockerfile
    image: qualee-api-v3
    container_name: qualee-api
    restart: unless-stopped
    working_dir: /var/www/project
    ports:
      - 8000:80
    volumes:
      - ./:/var/www/project
    networks:
      - qualee

  db:
    image: mysql:5.7
    container_name: qualee-db
    restart: unless-stopped
    environment:
      MYSQL_DATABASE: qualee_dev
      MYSQL_ROOT_PASSWORD: secret
      MYSQL_PASSWORD: root
      MYSQL_USER: root
      SERVICE_TAGS: dev
      SERVICE_NAME: mysql
    volumes:
      - ./docker-compose/mysql-data:/var/lib/mysql
    ports:
      - 33060:3306
    networks:
      - qualee
  redis:
    container_name: qualee-redis
    image: redis:6.0.9
    ports:
      - "6379:6379"
    volumes:
      - ./docker-compose/redis:/data
    networks:
      - qualee
networks:
  qualee:
    driver: bridge