Skip to content

FOSElasticaBundle- command (php bin/console fos:elastica:populate) do not work correctly. To do this, you need to create a fos_elastica.yaml or config.yml file? #1927

@vasyaShum

Description

@vasyaShum

Sorry for my English ...

File config\bundles.php

<?php
return [
    ...
    FOS\ElasticaBundle\FOSElasticaBundle::class => ['all' => true],
];

File docker-compose.override.yml

services:
  es01:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.17.14
    container_name: es01
    environment:
      - node.name=es01
      - cluster.name=es-docker-cluster
      - discovery.seed_hosts=es02,es03
      - cluster.initial_master_nodes=es01,es02,es03
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    volumes:
      - data01:/usr/share/elasticsearch/data
    ports:
      - 9200:9200
    networks:
      - elastic
  es02:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.17.14
    container_name: es02
    environment:
      - node.name=es02
      - cluster.name=es-docker-cluster
      - discovery.seed_hosts=es01,es03
      - cluster.initial_master_nodes=es01,es02,es03
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    volumes:
      - data02:/usr/share/elasticsearch/data
    networks:
      - elastic
  es03:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.17.14
    container_name: es03
    environment:
      - node.name=es03
      - cluster.name=es-docker-cluster
      - discovery.seed_hosts=es01,es02
      - cluster.initial_master_nodes=es01,es02,es03
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    volumes:
      - data03:/usr/share/elasticsearch/data
    networks:
      - elastic

volumes:
  data01:
    driver: local
  data02:
    driver: local
  data03:
    driver: local

networks:
  elastic:
    driver: bridge

I did everything according to this instruction : (Link)

Results now:

Problems:

  • commands php bin/console fos:elastica:populate , php bin/console fos:elastica:create do not start
    They give an error...

Questions:

  1. Which file, you need to create a config/packages/fos_elastica.yaml or config/config.yml ?
  2. if you do as it says in the GitHub documentation (with the creation of config), then the fos command gives an error ( There are no commands defined in the "fos:elastica" namespace.)

Please help, I can't find answers for several days ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions