-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
128 lines (119 loc) · 4.04 KB
/
docker-compose.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
x-default-opts:
&default-opts
logging:
options:
max-size: "10m"
configs:
traefik.yml:
file: ops/docker/traefik/traefik.yml
services:
traefik:
<<: *default-opts
depends_on:
traefik-mkcert:
condition: service_completed_successfully
traefik-otel-collector:
condition: service_started
# traefik-tempo:
# condition: service_started
container_name: traefik
image: webgrip/traefik-local-development-traefik:latest
pull_policy: always
build:
context: ./ops/docker/traefik
dockerfile: Dockerfile
restart: always
security_opt:
- no-new-privileges:true
environment:
- "OTEL_PROPAGATORS=tracecontext,baggage,jaeger"
command:
- "--configFile=/etc/traefik/traefik.yml"
ports:
- "80:80"
- "443:443"
- "8998:8998"
- "8999:8999"
configs:
- source: traefik.yml
target: /etc/traefik/traefik.yml
volumes:
- "/etc/localtime:/etc/localtime:ro"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "certificate-data:/etc/traefik/dynamic:rw"
- "./var/logs/traefik:/var/log/traefik:rw"
- "./.htpasswd:/etc/traefik/.htpasswd:ro"
labels:
- "traefik.enable=true"
- "traefik.http.routers.traefik.entrypoints=http"
- "traefik.http.routers.traefik.rule=Host(`dashboard.traefik.test`)"
- "traefik.http.middlewares.traefik-auth.basicauth.usersfile=/etc/traefik/.htpasswd"
- "traefik.http.middlewares.traefik-https-redirect.redirectscheme.scheme=https"
- "traefik.http.middlewares.sslheaders.headers.customrequestheaders.X-Forwarded-Proto=https"
- "traefik.http.routers.traefik.middlewares=traefik-https-redirect"
- "traefik.http.routers.traefik-secure.entrypoints=https"
- "traefik.http.routers.traefik-secure.rule=Host(`dashboard.traefik.test`)"
- "traefik.http.routers.traefik-secure.middlewares=traefik-auth"
- "traefik.http.routers.traefik-secure.tls=true"
- "traefik.http.routers.traefik-secure.tls.domains[0].main=dashboard.traefik.test"
- "traefik.http.routers.traefik-secure.tls.domains[0].sans=*.traefik.test"
- "traefik.http.routers.traefik-secure.service=api@internal"
traefik-mkcert:
container_name: traefik-mkcert
image: webgrip/traefik-local-development-mkcert:latest
build:
context: ./ops/docker/mkcert
dockerfile: Dockerfile
volumes:
- ~/.config/mkcert:/root/.local/share/mkcert:rw
- certificate-data:/certificate-data:rw
- ./ops/docker/mkcert/entrypoint.sh:/app/entrypoint.sh:ro
entrypoint: [ "/app/entrypoint.sh", "traefik.test", "dashboard.traefik.test" ]
traefik-dnsmasq:
image: jpillora/dnsmasq
container_name: traefik-dnsmasq
ports:
- "53:53/udp"
cap_add:
- NET_ADMIN
command: >
-A /test/127.0.0.1
restart: unless-stopped
volumes:
- ./var/resolver:/etc/resolver
traefik-otel-collector:
container_name: traefik-otel-collector
image: webgrip/traefik-local-development-otel-collector:latest
build:
context: ./ops/docker/otel-collector
dockerfile: Dockerfile
command: ["--config", "/etc/otelcol-contrib/config.yaml"]
volumes:
- ./ops/docker/otel-collector/config.yml:/etc/otelcol-contrib/config.yaml
# ports:
# - "1888:1888" # pprof extension
# - "8888:8888" # Prometheus metrics exposed by the collector
# - "8889:8889" # Prometheus exporter metrics
# - "13133:13133" # health_check extension
# - "4317:4317" # OTLP gRPC receiver
# - "4318:4318" # OTLP HTTP receiver
# traefik-tempo:
# container_name: traefik-tempo
# depends_on:
# traefik-otel-collector:
# condition: service_started
# image: webgrip/traefik-local-development-tempo:latest
# build:
# context: ./ops/docker/tempo
# dockerfile: Dockerfile
# ports:
# - "3200:3200" # UI
# - "14250:14250" # gRPC
# - "14249:14249" # HTTP
networks:
default:
external: true
name: webgrip
volumes:
certificate-data:
external: true