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

Installing gives The child node "redis" at path "maba_gentle_force" must be configured. #23

Open
mehdibo opened this issue Apr 8, 2020 · 7 comments

Comments

@mehdibo
Copy link

mehdibo commented Apr 8, 2020

When I run

composer require maba/gentle-force-bundle

I get:

Executing script cache:clear
Executed script cache:clear  [KO]
 [KO]
Script cache:clear returned with error code 1
!!  
!!  In ArrayNode.php line 216:
!!                                                                            
!!    The child node "redis" at path "maba_gentle_force" must be configured.  
!!                                                                            
!!  
!!  
Script @auto-scripts was called via post-update-cmd

Installation failed, reverting ./composer.json to its original content.
@pingou2712
Copy link

I have the same problem...
It's been 12 days !! It's really a shame that there was no response or even that you posted your own solution ...
I give you mine when I find ....

@mehdibo
Copy link
Author

mehdibo commented Apr 21, 2020

@pingou2712 Just create the file config/packages/maba_gentle_force.yaml manually and paste this in it:

maba_gentle_force:
  redis:
    host: '%env(REDIS_HOST)%'
  limits:
    global:
      - max_usages: 100
        period: 5m
  listeners:
    - path: ^/
      limits_key: global
      identifiers: [ip]
    - path: ^/
      limits_key: global
      identifiers: [username]

@pingou2712
Copy link

=)))) thank you!!!
I test that =)

@pingou2712
Copy link

pingou2712 commented Apr 21, 2020

Thank you a lot.
For just fix the composer install:
create before the file config/packages/maba_gentle_force.yaml
And paste:

maba_gentle_force:
  redis:
    host: '%env(REDIS_HOST)%'

The rest is for your own configuration =)

@murilozilli
Copy link

I get Environment variable not found: "REDIS_HOST". after that.
I believe the fix for this bundle would be to not make redis mandatory on the configuration file as not everyone uses redis.

@mehdibo
Copy link
Author

mehdibo commented Apr 27, 2021

@murilozilli just add

REDIS_HOST=YOUR_REDIS_HOST

to your .env file

@murilozilli
Copy link

@mehdibo thanks but i know the solution what I meant is that redis is a requirement for this project and I didnt know that beforehand, its not very explicit in the documentation, I thought I could use alternatives like database or sessions. Sorry for not being clearer haha

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

3 participants