PascalMinder / geoblock

Traefik middleware plugin - Deny requests based on country of origin
98 stars 10 forks source link

Installation as local #25

Closed Nocel closed 1 year ago

Nocel commented 1 year ago

Hi, I'm trying to install the plugin, but it doesn't work. What I don't know exactly is where to put the /plugins-local directory?

docker-compose.yml

...
    volumes:
    - /var/run/docker.sock:/var/run/docker.sock
    - ~/docker/traefik/traefik.yml:/traefik.yml
    - ~/docker/traefik/traefik_dynamic.yml:/traefik_dynamic.yml
    - ~/docker/traefik:/plugins-local/src/github.com/PascalMinder/geoblock/
    - ~/docker/traefik/acme.json:/acme.json
    - /var/log/traefik:/var/log

In the path ~/docker/traefik I have created the plugins-local directory and the plugin I have put in ~/docker/traefik/plugins-local/src/github.com/PascalMinder/geoblock/

Is this ok like this?

Some help would be nice

Regards

PascalMinder commented 1 year ago

As far as I know, you have to create a folder somewhere on your system, which docker can access (the first part of the line~/docker/traefik). Then you have to mount that path under /plugins-local/src/github.com/PascalMinder/geoblock/ in your docker container. Your local folder must contain the plugin. This should work.

Nocel commented 1 year ago

As far as I know, you have to create a folder somewhere on your system, which docker can access (the first part of the line~/docker/traefik). Then you have to mount that path under /plugins-local/src/github.com/PascalMinder/geoblock/ in your docker container. Your local folder must contain the plugin. This should work.

OK, now it works What it was doing wrong was that it actually created the /plugins-local folder.

Regards