Skip to content

Commit 913ef22

Browse files
authored
Documentation improvements (#91)
fair enough, seems appropriate.
1 parent 3e05713 commit 913ef22

File tree

2 files changed

+39
-36
lines changed

2 files changed

+39
-36
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ If you are using docker, you can install `headscale` alongside `headscale-ui`, l
1313
version: '3.5'
1414
services:
1515
headscale:
16-
image: headscale/headscale:latest-alpine
16+
image: headscale/headscale:latest
1717
container_name: headscale
1818
volumes:
1919
- ./container-config:/etc/headscale

documentation/configuration.md

Lines changed: 38 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,53 @@
1-
## Traefik Configuration
2-
(Thanks @DennisGaida)
1+
# Traefik Configuration
2+
3+
(Thanks [DennisGaida](https://github.com/DennisGaida) and [Niek](https://github.com/Niek))
4+
5+
Below is a complete docker-compose example for bringing up Traefik + headscale + headscale-ui. Run with: `docker-compose up -d` and headscale-ui will be accessible at <http://localhost/web>.
6+
37
```yaml
8+
version: '3.9'
9+
10+
services:
411
headscale:
512
image: headscale/headscale:latest
13+
pull_policy: always
614
container_name: headscale
715
restart: unless-stopped
8-
networks:
9-
- traefik_proxy
1016
command: headscale serve
1117
volumes:
12-
- $DOCKERDIR/headscale/config:/etc/headscale
18+
- ./headscale/config:/etc/headscale
19+
- ./headscale/data:/var/lib/headscale
1320
labels:
14-
- "traefik.enable=true"
15-
## HTTP Routers
16-
- "traefik.http.routers.headscale-rtr.entrypoints=https"
17-
- "traefik.http.routers.headscale-rtr.rule=Host(`hs.${DOMAIN_PUBLIC}`)"
18-
## Middlewares
19-
- "traefik.http.routers.headscale-rtr.middlewares=chain-no-auth@file"
20-
## HTTP Services
21-
- "traefik.http.routers.headscale-rtr.service=headscale-svc"
22-
- "traefik.http.services.headscale-svc.loadbalancer.server.port=8080"
21+
- traefik.enable=true
22+
- traefik.http.routers.headscale-rtr.rule=PathPrefix(`/`) # you might want to add: && Host(`your.domain.name`)"
23+
- traefik.http.services.headscale-svc.loadbalancer.server.port=8080
2324

2425
headscale-ui:
2526
image: ghcr.io/gurucomputing/headscale-ui:latest
27+
pull_policy: always
2628
container_name: headscale-ui
2729
restart: unless-stopped
28-
networks:
29-
- traefik_proxy
3030
labels:
31-
- "traefik.enable=true"
32-
## HTTP Routers
33-
- "traefik.http.routers.headscale_ui-rtr.entrypoints=https"
34-
- "traefik.http.routers.headscale_ui-rtr.rule=Host(`hs.${DOMAIN_PUBLIC}`) && PathPrefix(`/web`)"
35-
## Middlewares
36-
- "traefik.http.routers.headscale_ui-rtr.middlewares=chain-no-auth@file"
37-
## HTTP Services
38-
- "traefik.http.routers.headscale_ui-rtr.service=headscale_ui-svc"
39-
- "traefik.http.services.headscale_ui-svc.loadbalancer.server.port=443"
40-
- "traefik.http.services.headscale_ui-svc.loadbalancer.server.scheme=https"
41-
- "traefik.http.services.headscale_ui-svc.loadbalancer.serversTransport=disableSSLCheck@file"
42-
```
31+
- traefik.enable=true
32+
- traefik.http.routers.headscale-ui-rtr.rule=PathPrefix(`/web`) # you might want to add: && Host(`your.domain.name`)"
33+
- traefik.http.services.headscale-ui-svc.loadbalancer.server.port=80
4334

44-
and `traefik.yaml`
45-
```yaml
46-
http:
47-
serversTransports:
48-
disableSSLCheck:
49-
insecureSkipVerify: true
50-
```
35+
traefik:
36+
image: traefik:latest
37+
pull_policy: always
38+
restart: unless-stopped
39+
container_name: traefik
40+
command:
41+
- --api.insecure=true # remove in production
42+
- --providers.docker
43+
- --entrypoints.web.address=:80
44+
- --entrypoints.websecure.address=:443
45+
- --global.sendAnonymousUsage=false
46+
ports:
47+
- 80:80
48+
- 443:443
49+
- 8080:8080 # web UI (enabled with api.insecure)
50+
volumes:
51+
- /var/run/docker.sock:/var/run/docker.sock:ro
52+
- ./traefik/certificates:/certificates
53+
```

0 commit comments

Comments
 (0)