Skip to content

Commit

Permalink
docs: docker-config option
Browse files Browse the repository at this point in the history
  • Loading branch information
chetan committed Oct 9, 2022
1 parent 620acfe commit c7eb5d3
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 4 deletions.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,32 @@ The default interval of 60 seconds should be light so as not to cause any
issues, however it can be adjusted as needed via the `KOP_POLL_INTERVAL` env var
or set to 0 to disable it completely.

### Traefik Docker Provider Config

In addition to the simple `--docker-host` setting above, all [Docker Provider
configuration
options](https://doc.traefik.io/traefik/providers/docker/#provider-configuration)
are available via the `--docker-config <filename.yaml>` flag which expects
either a filename to read configuration from or an inline YAML document.

For example:

```yaml
services:
traefik-kop:
image: "ghcr.io/jittering/traefik-kop:latest"
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
REDIS_ADDR: "172.28.183.97:6380"
BIND_IP: "172.28.183.97"
DOCKER_CONFIG: |
---
docker:
defaultRule: Host(`{{.Name}}.foo.example.com`)
```

## Releasing

To release a new version, simply push a new tag to github.
Expand Down
13 changes: 9 additions & 4 deletions testing/kop/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@ version: "3"

services:
traefik-kop:
image: "ghcr.io/jittering/traefik-kop:latest"
image: "ghcr.io/jittering/traefik-kop:0.12.2-next-amd64"
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- "REDIS_ADDR=172.28.183.97:6380"
- "BIND_IP=172.28.183.97"
- "DEBUG=1"
REDIS_ADDR: "172.28.183.97:6380"
BIND_IP: "172.28.183.97"
DEBUG: "1"
DOCKER_CONFIG: |
---
docker:
exposedByDefault: false
useBindPortIP: true

0 comments on commit c7eb5d3

Please sign in to comment.