Repository navigation
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
73 lines (72 loc) · 2.8 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
73 lines (72 loc) · 2.8 KB
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
services:
proxy:
image: traefik:v3.7
restart: unless-stopped
depends_on:
httpbin:
condition: service_started
healthcheck:
test: ["CMD", "traefik", "healthcheck", "--ping"]
interval: 10s
timeout: 10s
retries: 10
ports:
- target: 8888
published: 8888
protocol: tcp
mode: host
- target: 4443
published: 4443
protocol: tcp
mode: host
- target: 4443
published: 4443
protocol: udp
mode: host
- target: 9999
published: 9999
protocol: tcp
mode: host
- target: 8754
published: 8754
protocol: tcp
mode: host
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./traefik:/certs
command:
- --providers.docker
- --providers.file.directory=/certs/
- --providers.file.watch=true
- --providers.docker.exposedbydefault=false
- --entrypoints.http.address=:8888
- --entrypoints.https.address=:4443
- --entrypoints.alt-http.address=:9999
- --entrypoints.alt-https.address=:8754
- --entrypoints.https.http3=true
- --entrypoints.alt-https.http3=false
- --entrypoints.alt-https.transport.keepAliveMaxTime=5s
- --accesslog
- --log
- --api.dashboard=false
- --ping
- --log.level=ERROR
httpbin:
image: mccutchen/go-httpbin:2.25
restart: unless-stopped
deploy:
replicas: 2
labels:
- traefik.enable=true
- traefik.http.routers.httpbin-http.rule=Host(`httpbin.local`) || Host(`alt.httpbin.local`) || Host(`localhost`) || Host(`127.0.0.1`) || Host(`good-ocsp.httpbin.local`) || Host(`revoked-ocsp.httpbin.local`) || Host(`good-crl.httpbin.local`) || Host(`revoked-crl.httpbin.local`)
- traefik.http.routers.httpbin-http.entrypoints=http,alt-http
- traefik.http.routers.httpbin-http.middlewares=httpbin-cors
- traefik.http.routers.httpbin-https.rule=Host(`httpbin.local`) || Host(`alt.httpbin.local`) || Host(`localhost`) || Host(`127.0.0.1`) || Host(`good-ocsp.httpbin.local`) || Host(`revoked-ocsp.httpbin.local`) || Host(`good-crl.httpbin.local`) || Host(`revoked-crl.httpbin.local`)
- traefik.http.routers.httpbin-https.entrypoints=https,alt-https
- traefik.http.routers.httpbin-https.middlewares=httpbin-cors
- traefik.http.routers.httpbin-https.tls=true
- traefik.http.middlewares.httpbin-cors.headers.accesscontrolalloworiginlist=*
- traefik.http.middlewares.httpbin-cors.headers.accesscontrolallowmethods=GET,POST,PUT,PATCH,DELETE,OPTIONS,HEAD
- traefik.http.middlewares.httpbin-cors.headers.accesscontrolallowheaders=*
- traefik.http.middlewares.httpbin-cors.headers.accesscontrolexposeheaders=*
- traefik.http.services.httpbin.loadbalancer.server.port=8080