Repository navigation
Expand file tree
/
Copy pathcompose.yml
More file actions
86 lines (82 loc) · 2.12 KB
/
Copy pathcompose.yml
File metadata and controls
86 lines (82 loc) · 2.12 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: activity-relay
x-relay-service: &relay-service
image: ${ACTIVITY_RELAY_IMAGE:-ghcr.io/thystra/activity-relay:3.1.0}
working_dir: /var/lib/relay
restart: unless-stopped
init: true
volumes:
- type: bind
source: ./actor.pem
target: /var/lib/relay/actor.pem
read_only: true
bind:
create_host_path: false
# Activity-Relay Directory settings live in ./config.yml. The shipped
# config example includes an opt-in public Directory and Directory index.
- type: bind
source: ./config.yml
target: /var/lib/relay/config.yml
read_only: true
bind:
create_host_path: false
- type: bind
source: ${RELAY_CACHE_DIR:-./cache}
target: /var/cache/activity-relay
logging: &bounded-logging
driver: local
options:
max-size: ${CONTAINER_LOG_MAX_SIZE:-10m}
max-file: ${CONTAINER_LOG_MAX_FILES:-5}
depends_on:
redis:
condition: service_healthy
services:
redis:
image: redis:7-alpine
restart: unless-stopped
command:
- redis-server
- --maxmemory
- ${REDIS_MAXMEMORY:-512mb}
- --maxmemory-policy
- noeviction
- --save
- "900 1 300 10 60 10000"
- --appendonly
- "no"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 20
start_period: 5s
volumes:
- ${RELAY_STORAGE_DIR:-./redisdata}:/data
logging: *bounded-logging
mem_limit: ${REDIS_CONTAINER_MEMORY:-768m}
pids_limit: 128
worker:
<<: *relay-service
command: ["worker"]
mem_limit: ${WORKER_MEMORY_LIMIT:-512m}
pids_limit: 256
deploy:
replicas: ${WORKER_REPLICAS:-2}
server:
<<: *relay-service
command: ["server"]
ports:
- "${RELAY_PUBLISH_ADDRESS:-127.0.0.1}:${RELAY_HTTP_PORT:-8080}:8080"
healthcheck:
test:
- CMD
- wget
- --quiet
- --output-document=/dev/null
- http://127.0.0.1:8080/status.json
interval: 15s
timeout: 5s
retries: 10
start_period: 10s
mem_limit: ${SERVER_MEMORY_LIMIT:-512m}
pids_limit: 256