-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathstk_traefik.yml
67 lines (63 loc) · 1.82 KB
/
stk_traefik.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
version: '3.7'
# logs config
x-default-opts:
&default-opts
logging:
options:
max-size: "10m"
services:
traefik:
<<: *default-opts
image: traefik:v2.0.6
# Enabling the API (--api=true) in production is not recommended, because it will expose
# all configuration elements, including sensitive data.
command: >
--providers.docker.endpoint=tcp://proxysocket:2375
--providers.docker.swarmMode=true
--providers.docker.exposedbydefault=false
--providers.docker.swarmModeRefreshSeconds=5
--providers.docker.network=ntw_front
--entrypoints.web.address=:80
--api.dashboard=true
--api.insecure=true
# --api=true
# --api.debug=true
# --accesslog=true
# --tracing.instana.logLevel=info
ports:
- "80:80"
- "8080:8080"
networks:
- ntw_front
- ntw_proxy
deploy:
mode: replicated
replicas: 1
restart_policy:
condition: any
max_attempts: 50
update_config:
delay: 2s
placement:
constraints: [node.role==manager]
resources:
limits:
cpus: '0.33'
memory: 96M
reservations:
cpus: '0.05'
memory: 48M
labels:
- "traefik.enable=true"
- "traefik.http.routers.api.middlewares=auth"
#admin / asdasd
- "traefik.http.middlewares.auth.basicauth.users=admin:$$2y$$05$$p9itekIkYY57M8GI11tQYeDfEPpn5ukfHOm33F8l6EuGnBPGzm8bq"
#Dummy service for Swarm port detection. The port can be any valid integer value.
- "traefik.http.services.dummy-svc.loadbalancer.server.port=57777"
#- "traefik.http.routers.api.rule=PathPrefix(`/traefik`)"
#- "traefik.http.routers.api.service=api@internal"
networks:
ntw_front:
external: true
ntw_proxy:
external: true