-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
executable file
·169 lines (162 loc) · 4.27 KB
/
docker-compose.yml
File metadata and controls
executable file
·169 lines (162 loc) · 4.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
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
services:
redis:
image: "redis"
restart: always
command: redis-server --appendonly yes
healthcheck:
test: "redis-cli ping | grep PONG || exit 1"
interval: 5s
timeout: 3s
retries: 5
volumes:
- redis_storage:/data
networks:
- feedfathom
postgres:
image: "pgautoupgrade/pgautoupgrade:17-bookworm"
restart: always
command: [ "-c", "max_connections=1000" ]
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
POSTGRES_USER: ${POSTGRES_USER:-postgres}
healthcheck:
test: 'pg_isready --username=${POSTGRES_USER:-postgres} && psql --username=${POSTGRES_USER:-postgres} -c "SELECT * FROM postgres.pg_catalog.pg_database;"'
interval: 1s
timeout: 1s
retries: 25
start_period: 1s
volumes:
- postgres_storage_17:/var/lib/postgresql/data
networks:
- feedfathom
migrator:
init: true
image: ghcr.io/smartrss/feedfathom/feedfathom-worker:${FEEDFATHOM_TAG:-main}
environment:
INTEGRATION: "migrator"
depends_on:
postgres:
condition: service_healthy
networks:
- feedfathom
server:
init: true
image: ghcr.io/smartrss/feedfathom/feedfathom-server:${FEEDFATHOM_TAG:-main}
restart: always
deploy:
update_config:
parallelism: 1
delay: 10s
order: start-first
replicas: ${APP_REPLICAS:-1}
ports:
- "3456:3000"
environment:
ALLOWED_EMAILS: ${ALLOWED_EMAILS:-}
ENABLE_REGISTRATION: ${ENABLE_REGISTRATION:-false}
MAIL_REPLICAS: ${MAIL_REPLICAS:-0}
MAIL_ENABLED: ${MAIL_ENABLED:-false}
FEED_FATHOM_DOMAIN: ${FEED_FATHOM_DOMAIN:-}
MAILJET_API_KEY: ${MAILJET_API_KEY}
MAILJET_API_SECRET: ${MAILJET_API_SECRET}
TURNSTILE_SITE_KEY: ${TURNSTILE_SITE_KEY}
TURNSTILE_SECRET_KEY: ${TURNSTILE_SECRET_KEY}
healthcheck:
test: "curl -f http://localhost:3000/healthcheck || exit 1"
interval: 5s
timeout: 1s
retries: 2
start_period: 5s
depends_on:
redis:
condition: service_healthy
postgres:
condition: service_healthy
migrator:
condition: service_completed_successfully
tmpfs:
- /tmp
networks:
- feedfathom
worker:
init: true
image: ghcr.io/smartrss/feedfathom/feedfathom-worker:${FEEDFATHOM_TAG:-main}
restart: always
environment:
DEBUG: bull:*
INTEGRATION: worker
WORKER_CONCURRENCY: ${WORKER_CONCURRENCY:-25}
LOCK_DURATION: ${LOCK_DURATION:-60}
CLEANUP_INTERVAL: ${CLEANUP_INTERVAL:-20}
GATHER_JOBS_INTERVAL: ${GATHER_JOBS_INTERVAL:-20}
deploy:
replicas: ${WORKER_REPLICAS:-10}
resources:
limits:
cpus: "${WORKER_CPU_LIMIT:-0.50}"
memory: "${WORKER_MEM_LIMIT:-1500M}"
reservations:
cpus: "${WORKER_CPU_RESERVATION:-0.25}"
memory: "${WORKER_MEM_RESERVATION:-500M}"
update_config:
parallelism: 5
delay: 15s
order: start-first
failure_action: rollback
monitor: 15s
healthcheck:
test: "curl -f http://localhost:3000/healthcheck || exit 1"
interval: 5s
timeout: 1s
retries: 2
start_period: 5s
depends_on:
redis:
condition: service_healthy
postgres:
condition: service_healthy
migrator:
condition: service_completed_successfully
tmpfs:
- /tmp
networks:
- feedfathom
mail:
init: true
image: ghcr.io/smartrss/feedfathom/feedfathom-worker:${FEEDFATHOM_TAG:-main}
ports:
- "25:25"
restart: always
environment:
DEBUG: bull:*
INTEGRATION: "mail"
deploy:
mode: global
replicas: ${MAIL_REPLICAS:-0}
update_config:
parallelism: 1
delay: 10s
order: start-first
healthcheck:
test: "curl -f http://localhost:3000/healthcheck || exit 1"
interval: 5s
timeout: 1s
retries: 2
start_period: 5s
depends_on:
postgres:
condition: service_healthy
migrator:
condition: service_completed_successfully
tmpfs:
- /tmp
networks:
- feedfathom
volumes:
redis_storage:
driver: local
postgres_storage_17:
driver: local
networks:
feedfathom:
driver: bridge