-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmemcached.yaml
46 lines (44 loc) · 1.05 KB
/
memcached.yaml
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
services:
memcached:
image: memcached:1.6.34-alpine
# Allocate up to 256 MB of RAM with at max 10 MB per key and run using a UNIX socket (faster).
command: [ "memcached", "-m", "256", "-I", "10m", "--unix-socket", "/tmp/memcached.sock", "--unix-mask", "766" ]
volumes:
- cache-socket:/tmp
networks:
internal:
read_only: true
healthcheck:
test: nc -vz -w1 local:/tmp/memcached.sock
start_period: 60s
start_interval: 1s
interval: 60s
timeout: 60s
retries: 3
restart: unless-stopped
cap_drop:
- ALL
deploy:
resources:
limits:
cpus: "1"
memory: 260M
reservations:
memory: 20M
logging:
options:
max-file: "3"
max-size: "10m"
migrate:
volumes: &socket_volume
- cache-socket:/var/run/memcached
depends_on:
memcached:
condition: service_healthy
django:
volumes: *socket_volume
depends_on:
memcached:
condition: service_healthy
volumes:
cache-socket: