PascalMinder / geoblock

Traefik middleware plugin - Deny requests based on country of origin
105 stars 9 forks source link

Plugin manifest error #22

Closed ezruneko closed 2 years ago

ezruneko commented 2 years ago

Traefik version: 2.8.1

traefik.yml

experimental:
  localPlugins:
    geoblock:
      moduleName: github.com/PascalMinder/GeoBlock

Crash with only add this four lines and traefik can't started.

The log error:

2022/07/21 08:59:15 traefik.go:80: command traefik error: 1 error occurred:
    * failed to open the plugin manifest plugins-local/src/github.com/PascalMinder/GeoBlock/.traefik.yml: open plugins-local/src/github.com/PascalMinder/GeoBlock/.traefik.yml: no such file or directory
PascalMinder commented 2 years ago

can you change the line moduleName: github.com/PascalMinder/GeoBlock to moduleName: github.com/PascalMinder/geoblock?

ezruneko commented 2 years ago

Same error with url in lowercaser

2022/07/21 09:24:52 traefik.go:80: command traefik error: 1 error occurred:
    * failed to open the plugin manifest plugins-local/src/github.com/PascalMinder/geoblock/.traefik.yml: open plugins-local/src/github.com/PascalMinder/geoblock/.traefik.yml: no such file or directory
PascalMinder commented 2 years ago

Did you want to configure it as a local plugin? This would mean you have to manually install all files at the right location.

ezruneko commented 2 years ago

i've followed your readme at https://github.com/PascalMinder/geoblock/blob/main/readme.md

but one second to add:

experimental: hub: true plugins: geoblock: modulename: github.com/PascalMinder/geoblock version: v0.2.3

ezruneko commented 2 years ago

Working with the next configuration without localPlugins tag

traefik.yml

entryPoints:
    http:
      middlewares:
        - geoblock-plugin@file
experimental:
 plugins:
    geoblock:
      modulename: github.com/PascalMinder/geoblock
      version: v0.2.3

http-geoblock.yml

http:
  middlewares:
    geoblock-plugin:
      plugin:
        geoblock:
               ....
PascalMinder commented 2 years ago

The one in the readme shows how to install it as a local plugin. This means, you also would have to add the folder with the source of the plugin to your docker container.

ezruneko commented 2 years ago

i've recommend you to add both options to the readme to avoid noob post like me :( and add a comment to this "localPlugins" with the full process. thank you for your support

PascalMinder commented 2 years ago

Updated readme