services:
  # dev:
  #   image: renandci/clinics:development
  #   ports:
  #     - ${PORT:-3333}:${PORT:-3333}
  #   command: sh -c "npm run dev"
  #   volumes:
  #     - ./:/app
  #     - /app/node_modules
  #   networks:
  #     - shared
  #   depends_on:
  #     - db

  phpmyadmin:
    image: phpmyadmin/phpmyadmin
    container_name: phpmyadmin
    restart: unless-stopped
    ports:
      - 8004:80
    environment:
      - PMA_ARBITRARY=1
      - PMA_HOST=host.docker.internal
      - PMA_USER=root
      - PMA_PASSWORD=root
      - PMA_PORT=3306
    depends_on:
      - db
    networks:
      - shared

  db:
    image: mysql:5.7
    command: --default-authentication-plugin=mysql_native_password
    ports:
      - 3306:3306
    volumes:
       - ./.db/:/var/lib/mysql
    networks:
      - shared
    environment:
      MYSQL_DATABASE: clinics_db
      MYSQL_ROOT_PASSWORD: root

networks:
  shared:
    driver: bridge
    name: network-clinics
