Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
vasyaShum opened this issue Oct 18, 2023 · 0 comments

Comments

@vasyaShum
Copy link

vasyaShum commented Oct 18, 2023

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 ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant