version: '3.8'

services:
  app:
    container_name: ftc-app
    build:
      context: .
      dockerfile: docker/php/Dockerfile
    environment:
      SERVICE_NAME: ftc
      SERVICE_TAGS: dev
      PHP_IDE_CONFIG: "serverName=ftc"
    volumes:
      - ./docker/ftc_storage/:/var/www/html/ftc_storage/
      - ./:/var/www/html/filetransfercloud/
      - ./docker/php/conf.d/docker-php-ext-xdebug.ini:/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
    ports:
      - "8000:80"


  database:
    container_name: ftc
    platform: linux/x86_64
    image: mysql:8.0
    cap_add:
      - SYS_NICE  # CAP_SYS_NICE
    command: mysqld --sql_mode="" --skip-name-resolve --default-authentication-plugin=mysql_native_password
    environment:
      MYSQL_ROOT_PASSWORD: secret
      MYSQL_DATABASE: ftc
      MYSQL_USER: symfony
      MYSQL_PASSWORD: symfony
    ports:
      - 4306:3306

    #volumes:
      #- ./docker/mysql:/var/lib/mysql

  adminer:
    image: adminer
    # restart: always
    ports:
      - 8090:8080
