-
Notifications
You must be signed in to change notification settings - Fork 449
/
docker-compose.yml
68 lines (62 loc) · 1.59 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
version: "3"
services:
redis:
image: redis:alpine
expose:
- 6379
ports:
- 6379:6379
networks:
- ratelimit-network
memcached:
image: memcached:alpine
expose:
- 11211
ports:
- 11211:11211
networks:
- ratelimit-network
# minimal container that builds the ratelimit service binary and exits.
ratelimit-build:
image: golang:1.21.5-alpine
working_dir: /go/src/github.com/envoyproxy/ratelimit
command: go build -o /usr/local/bin/ratelimit ./src/service_cmd/main.go
volumes:
- .:/go/src/github.com/envoyproxy/ratelimit
- binary:/usr/local/bin/
ratelimit-client-build:
image: golang:1.21.5-alpine
working_dir: /go/src/github.com/envoyproxy/ratelimit
command: go build -o /usr/local/bin/ratelimit_client ./src/client_cmd/main.go
volumes:
- .:/go/src/github.com/envoyproxy/ratelimit
- binary:/usr/local/bin/
ratelimit:
image: alpine:3.6
command: >
sh -c "until test -f /usr/local/bin/ratelimit; do sleep 5; done; /usr/local/bin/ratelimit"
ports:
- 8080:8080
- 8081:8081
- 6070:6070
depends_on:
- redis
- ratelimit-build
- ratelimit-client-build
networks:
- ratelimit-network
volumes:
- binary:/usr/local/bin/
- ./examples:/data
environment:
- USE_STATSD=false
- LOG_LEVEL=debug
- REDIS_SOCKET_TYPE=tcp
- REDIS_URL=redis:6379
- RUNTIME_ROOT=/data
- RUNTIME_SUBDIRECTORY=ratelimit
- MEMCACHE_HOST_PORT=memcached:11211
networks:
ratelimit-network:
volumes:
binary: