-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
40 lines (39 loc) · 915 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
40 lines (39 loc) · 915 Bytes
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
services:
redis:
image: redis:7-alpine
container_name: redis_rate_limiter
ports:
- "6379:6379"
volumes:
- redis_data:/data
command: redis-server --user admin on ">password" ~* "&*" +@all
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 10s
timeout: 5s
retries: 5
restart: no
app:
build:
context: .
dockerfile: Dockerfile
container_name: distributed_rate_limiter
ports:
- "8080:8080"
environment:
REDIS_HOST: redis
REDIS_PORT: 6379
JAVA_OPTS: "-Xms256m -Xmx512m"
depends_on:
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider",
"http://localhost:8080/api/v1/health"]
interval: 30s
timeout: 10s
start_period: 60s
retries: 3
restart: no
volumes:
redis_data: