Skip to content

Commit

Permalink
Merge PR #28: feat: Make apps reachable via IPv6
Browse files Browse the repository at this point in the history
  • Loading branch information
YtvwlD committed Mar 10, 2023
2 parents caa6eab + 24bf3e1 commit cf8de63
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 5 deletions.
16 changes: 16 additions & 0 deletions README.md
Expand Up @@ -40,6 +40,8 @@ The Vagrantfile remaps this to 8080 and 4443.

## Notes

### DNS

Traefik does not manage DNS records yet.

When running swarm on localhost, make sure to add DNS records e.g. to `/etc/hosts`:
Expand Down Expand Up @@ -73,4 +75,18 @@ When running swarm on localhost, make sure to add DNS records e.g. to `/etc/host
127.0.0.1 snmp
```

### Disabled containers

Portainer and swarmpit are fancy management web UIs and can be deployed tor testing.

### IPv6

Docker has [experimental `ip6tables` support](https://github.com/moby/moby/pull/41622).
When enabling it (and
[reconfiguring `docker_gwbridge`](https://github.com/robbertkl/docker-ipv6nat/blob/master/README.md#swarm-mode-support)
), containers get internal IPv6 addresses and might be able to reach external
hosts via IPv6. This does not seem to work for the ingress network, though.

That's why forwarded ports are marked with `mode: host` which bypasses Swarm's
load balancing.

7 changes: 7 additions & 0 deletions configs/traefik-static.toml
@@ -1,3 +1,10 @@
[entryPoints]
[entryPoints.web]
address = ":80"

[entryPoints.websecure]
address = ":443"

[providers]
[providers.file]
filename = "/etc/traefik/dynamic.toml"
Expand Down
4 changes: 3 additions & 1 deletion enabled/siamqtt.yml
Expand Up @@ -9,7 +9,9 @@ services:
secrets:
- SIAMQTT_SENTRY_DSN
ports:
- 1001:1001
- published: 1001
target: 1001
mode: host
deploy:
mode: replicated
replicas: 1
Expand Down
12 changes: 8 additions & 4 deletions enabled/traefik.yml
Expand Up @@ -7,7 +7,7 @@ services:
CF_API_EMAIL: account+cloudflare@chaosdorf.de
CF_API_KEY_FILE: /run/secrets/CF_API_KEY
configs:
- source: static
- source: static2
target: /etc/traefik/traefik.toml
- source: dynamic
target: /etc/traefik/dynamic.toml
Expand All @@ -21,8 +21,12 @@ services:
networks:
- traefik
ports:
- 80:80
- 443:80
- published: 80
target: 80
mode: host
- published: 443
target: 443
mode: host
deploy:
mode: global
placement:
Expand Down Expand Up @@ -87,7 +91,7 @@ networks:
name: traefik_net

configs:
static:
static2:
file: ../configs/traefik-static.toml
dynamic:
file: ../configs/traefik-dynamic.toml
Expand Down

0 comments on commit cf8de63

Please sign in to comment.