-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
51 lines (49 loc) · 1.27 KB
/
Copy pathcompose.yml
File metadata and controls
51 lines (49 loc) · 1.27 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
services:
api:
build: .
ports:
- "127.0.0.1:8080:8080"
environment:
ASPNETCORE_ENVIRONMENT: Production
DEPOTBOX_BASE_URL: https://depotbox.org
DEPOTBOX_API_KEY: ${DEPOTBOX_API_KEY:?Set DEPOTBOX_API_KEY in .env}
REDIS_CONNECTION: redis:6379,abortConnect=false
UPSTREAM_REQUESTS_PER_MINUTE: ${UPSTREAM_REQUESTS_PER_MINUTE:-50}
healthcheck:
test: ["CMD", "curl", "--fail", "--silent", "http://127.0.0.1:8080/health/ready"]
interval: 10s
timeout: 5s
retries: 6
start_period: 20s
depends_on:
redis:
condition: service_healthy
restart: unless-stopped
init: true
read_only: true
tmpfs:
- /tmp:rw,noexec,nosuid,size=64m
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
mem_limit: 512m
cpus: 1.0
redis:
image: redis:7-alpine
command: ["redis-server", "--appendonly", "yes", "--maxmemory", "256mb", "--maxmemory-policy", "noeviction"]
volumes:
- redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 10
start_period: 5s
restart: unless-stopped
security_opt:
- no-new-privileges:true
mem_limit: 320m
cpus: 0.50
volumes:
redis-data: