forked from mancej/fileserver-challenge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
73 lines (69 loc) · 1.6 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
version: "3.8"
services:
file_server:
# container_name: file-server
build:
context: file_server/
ports:
- "1234"
deploy:
resources:
limits:
memory: 128M
cpus: "0.25"
replicas: 5
volumes:
- ./.fileserver/data:/tmp/
environment:
- REDIS_HOST=redis
- REDIS_PORT=6379
middleware:
# container_name: middleware
build:
context: middleware/
ports:
- "8080"
depends_on:
- redis
- file_server
environment:
- FILE_SERVER_HOST=file_server
- FILE_SERVER_PORT=1234
- FILE_SERVER_PROTO=http
- REDIS_HOST=redis
- REDIS_PORT=6379
deploy:
replicas: 5
redis:
container_name: redis
image: redis:alpine
ports:
- "6379:6379"
volumes:
- ./.redis/data:/data
# volumes:
# - redis_data:/data
# LOAD TESTER:
# This container is for convenience and does not count against your resource cap.
# Comment this out if you want to manually run load tests from the `load_test` directory.
go_load_tester:
container_name: load-tester
build:
context: go_load_test/
environment:
- FILE_SERVER_HOST=middleware
- FILE_SERVER_PORT=8080
- FILE_SERVER_PROTO=http
- FILE_SERVER_PATH_PREFIX=api/fileserver
- REQUESTS_PER_SECOND=1
- SEED_GROWTH_AMOUNT=1
- ENABLE_REQUEST_RAMP=true
- ENABLE_FILE_RAMP=true
- MAX_FILE_COUNT=3000
- MAX_FILE_SIZE=1024
- TERM=xterm-256color
volumes:
- ./.fileserver/data:/tmp/
depends_on:
- middleware
# - cache