-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
126 lines (115 loc) · 2.93 KB
/
docker-compose.yml
File metadata and controls
126 lines (115 loc) · 2.93 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
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
services:
app1:
build: ./app
expose: ["8000"]
ports: ["8001:8000"]
environment:
- GUNICORN_WORKERS=1
- NAME="app_1"
# - JOB_FACTOR=0.0001
deploy:
resources:
limits:
cpus: "0.50"
app2:
build: ./app
expose: ["8000"]
environment:
- GUNICORN_WORKERS=1
- NAME="app_2"
# - JOB_FACTOR=0.0001
deploy:
resources:
limits:
cpus: "0.50"
app3:
build: ./app
expose: ["8000"]
environment:
- GUNICORN_WORKERS=1
- NAME="app_3"
# - JOB_FACTOR=0.0001
deploy:
resources:
limits:
cpus: "0.50"
app4:
build: ./app
expose: ["8000"]
environment:
- GUNICORN_WORKERS=1
- NAME="app_4"
# - JOB_FACTOR=0.0001
deploy:
resources:
limits:
cpus: "0.50"
app5:
build: ./app
expose: ["8000"]
environment:
- GUNICORN_WORKERS=1
- NAME="app_5"
# - JOB_FACTOR=0.0001
deploy:
resources:
limits:
cpus: "0.50"
nginx:
image: nginx:1.27-alpine
depends_on: [app1, app2, app3, app4, app5]
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
ports:
- "8082:8082" # nginx random
- "8083:8083" # nginx least-connections
caddy:
image: caddy:2
depends_on: [app1, app2, app3, app4, app5]
volumes:
- ./caddy/Caddyfile:/etc/caddy/Caddyfile:ro
ports:
- "9082:8082"
- "9083:8083"
traefik:
image: traefik:v3.6.2
depends_on: [app1, app2, app3, app4, app5]
command:
- "--log.level=DEBUG"
- "--providers.file.directory=/etc/traefik/dynamic"
- "--providers.file.watch=true"
- "--entrypoints.web.address=:8082"
- "--entrypoints.web2.address=:8083"
- "--accesslog=true"
ports:
- "10082:8082" # Traefik entrypoint 1 (e.g. RR/random)
- "10083:8083" # Traefik entrypoint 2 (e.g. least-time)
volumes:
- ./traefik/traefik.yml:/etc/traefik/traefik.yml:ro
- ./traefik/dynamic.yml:/etc/traefik/dynamic/dynamic.yml:ro
sender:
build: ./sender
depends_on: [traefik, nginx, caddy]
environment:
# - TARGET_R_NGINX=http://nginx:8082/calculate #Random NGinx
- TARGET_LC_NGINX=http://nginx:8083/calculate #Least connections Nginx
# CADDY
#- TARGET_R_CADDY=http://caddy:9082/calculate #Random Caddy
# - TARGET_LC_CADDY=http://caddy:9083/calculate #Least connections Caddy
# TRAEFIK
- TARGET_LT_TRAEFIK=http://traefik:8082/calculate
# - TARGET_LC_TRAEFIK=http://traefik:8083/calculate
- DURATION_SEC=60
- CAPTURE_UPSTREAM=1
- JOB_MODE=cycle
- JOBS=A,B,C
- JOB_WEIGHTS=C:6,E:3,A:1
- REQUEST_TIMEOUT_SEC=120
- CONCURRENCY=5
- TARGET_RPS=0
- RUN_STREAM=0
- RUN_BATCH=1
- BATCH_COUNT=2
- BATCH_REQUESTS=50
- START_DELAY_SEC=10
- COOLDOWN_SEC=5