Skip to content

Commit 76d7d32

Browse files
committed
traefik with auth
1 parent 6081c13 commit 76d7d32

File tree

4 files changed

+33
-25
lines changed

4 files changed

+33
-25
lines changed

traefik_stack5/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ cd "$ENV_MONOREPO" && \
2929

3030
```
3131
echo "CONFIGURE ENV_VAR" && \
32-
ENV_EDGE_BRANCH="1.54";
32+
ENV_EDGE_BRANCH="1.55";
3333
ENV_MONOREPO="traefik_stack5";
3434
3535
echo "Setup the stack" && \

traefik_stack5/configs/acme.json

Whitespace-only changes.

traefik_stack5/configs/traefik.toml

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,27 @@
1-
defaultEntryPoints = ["http"]
1+
defaultEntryPoints = ["http", "https"]
22

33
[entryPoints]
4-
[entryPoints.http]
5-
address = ":80"
6-
# compress = false
7-
# [entryPoints.http.redirect]
8-
# entryPoint = "https"
9-
# [entryPoints.https]
10-
# address = ":443"
11-
# [entryPoints.https.tls]
12-
# [[entryPoints.https.tls.certificates]]
13-
# CertFile = "/etc/traefik/domain.com.cert"
14-
# KeyFile = "/etc/traefik/domain.com.key"
4+
[entryPoints.dashboard]
5+
address = ":8080"
6+
[entryPoints.dashboard.auth]
7+
[entryPoints.dashboard.auth.basic]
8+
users = ["admin:$2y$05$pAfipn3.brdHMI2eWGnYH.84XYqLozp1sUPi36/l54UAwv.zGLtNC"]
9+
[entryPoints.http]
10+
address = ":80"
11+
[entryPoints.http.redirect]
12+
entryPoint = "https"
13+
[entryPoints.https]
14+
address = ":443"
15+
[entryPoints.https.tls]
1516

16-
#[acme]
17-
#email = jean-michel@domain.com"
18-
#storage = "/etc/traefik/acme.json"
19-
#entryPoint = "https"
20-
#onDemand = true
21-
#OnHostRule = true
22-
#acmeLogging = true
17+
[api]
18+
entrypoint="dashboard"
19+
20+
[acme]
21+
email = "your_email@your_domain.net"
22+
storage = "acme.json"
23+
entryPoint = "https"
24+
caServer = "https://acme-staging-v02.api.letsencrypt.org/directory"
25+
onHostRule = true
26+
[acme.httpChallenge]
27+
entryPoint = "http"

traefik_stack5/toolproxy.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,15 @@ services:
4646
protocol: tcp
4747
published: 443
4848
mode: ingress
49-
- target: 8080
50-
protocol: tcp
51-
published: 8080
52-
mode: ingress
49+
#- target: 8080
50+
# protocol: tcp
51+
# published: 8080
52+
# mode: ingress
5353
networks:
5454
- ntw_front
5555
- ntw_proxy
56+
volumes:
57+
- ./configs/acme.json:/acme.json
5658
configs:
5759
- source: traefik.toml
5860
target: /etc/traefik/traefik.toml
@@ -85,9 +87,10 @@ services:
8587
cpus: '0.05'
8688
memory: 48M
8789
labels:
90+
- "traefik.frontend.rule=PathPrefixStrip:/traefik"
8891
- "traefik.backend=traefik"
8992
- "traefik.enable=true"
90-
- "traefik.logLevel=DEBUG"
93+
#- "traefik.logLevel=DEBUG"
9194
- "traefik.port=8080"
9295
- "traefik.passHostHeader=true"
9396
- "traefik.frontend.entryPoints=http"

0 commit comments

Comments
 (0)