version: "3.5" services: mysql: image: mariadb:latest volumes: - db-data:/var/lib/mysql - ./Docker/mysql/mysql.cnf:/etc/mysql/conf.d/custom.cnf:ro - ./Docker/mysql/bashrc:/root/.bashrc:ro # - "${DB_IMPORTE_FILE_D8}:/docker-entrypoint-initdb.d/materio_d8.sql" networks: - database hostname: mysql environment: MYSQL_ROOT_PASSWORD: "${DB_ROOT_PASSWORD}" MYSQL_DATABASE: "${DB_NAME}" MYSQL_USER: "${DB_USERNAME}" MYSQL_PASSWORD: "${DB_PASSWORD}" mysql-legacy: image: mariadb:latest volumes: - db-data-legacy:/var/lib/mysql - ./Docker/mysql/mysql.cnf:/etc/mysql/conf.d/custom.cnf:ro - ./Docker/mysql/bashrc:/root/.bashrc:ro - "${DB_IMPORTE_FILE_D7}:/docker-entrypoint-initdb.d/materio_d7.sql" networks: - database hostname: mysql-legacy environment: MYSQL_ROOT_PASSWORD: "${DB_ROOT_PASSWORD}" MYSQL_DATABASE: "${DB_LEGACY_NAME}" MYSQL_USER: "${DB_USERNAME}" MYSQL_PASSWORD: "${DB_PASSWORD}" redis: image: redis:4 volumes: - redis-data:/data networks: - redis ports: - "6389" php: build: ./Docker/php/ expose: - 9000 volumes: - php-root-data:/root - "${PROJECT_ROOT}:/var/www/html/d8.materio.com/public_html" - "${LEGACY_ROOT}:/var/www/html/d7.materio.com/public_html" working_dir: "/var/www/html/d8.materio.com/public_html" networks: - database - redis - server depends_on: - mysql - mysql-legacy - redis phpmyadmin: image: phpmyadmin/phpmyadmin ports: - 8891:80 networks: - database depends_on: - mysql - mysql-legacy environment: PMA_HOSTS: mysql,mysql-legacy nginx: build: ./Docker/nginx/ ports: - 8890:80 volumes: - "${PROJECT_ROOT}:/var/www/html/d8.materio.com/public_html" - "${LEGACY_ROOT}:/var/www/html/d7.materio.com/public_html" - "${LOG_ROOT}:/var/log:rw" working_dir: "/var/www/html/d8.materio.com/public_html" networks: - server depends_on: - php volumes: php-root-data: db-data: db-data-legacy: redis-data: networks: database: redis: server: