@@ -102,6 +102,10 @@ x-fluxer-service: &fluxer-service
102102services :
103103 caddy :
104104 image : caddy:2.10-alpine
105+ deploy :
106+ resources :
107+ limits :
108+ memory : 256mb
105109 restart : unless-stopped
106110 networks : [fluxer]
107111 ports :
@@ -123,6 +127,12 @@ services:
123127
124128 postgres :
125129 image : postgres:16-alpine
130+ deploy :
131+ resources :
132+ limits :
133+ memory : 2gb
134+ reservations :
135+ memory : 768mb
126136 restart : unless-stopped
127137 networks : [fluxer]
128138 command : >
@@ -164,9 +174,13 @@ services:
164174
165175 valkey :
166176 image : valkey/valkey:8.1-alpine
177+ deploy :
178+ resources :
179+ limits :
180+ memory : 256mb
167181 restart : unless-stopped
168182 networks : [fluxer]
169- command : ["valkey-server", "--save", "", "--appendonly", "no"]
183+ command : ["valkey-server", "--save", "", "--appendonly", "no", "--maxmemory", "192mb", "--maxmemory-policy", "allkeys-lru" ]
170184 healthcheck :
171185 test : ["CMD", "valkey-cli", "ping"]
172186 interval : 10s
@@ -175,6 +189,10 @@ services:
175189
176190 nats :
177191 image : nats:2.14-alpine
192+ deploy :
193+ resources :
194+ limits :
195+ memory : 256mb
178196 restart : unless-stopped
179197 networks : [fluxer]
180198 command : ["-js", "-sd", "/data", "-m", "8222"]
@@ -183,17 +201,26 @@ services:
183201
184202 meilisearch :
185203 image : getmeili/meilisearch:v1.12
204+ deploy :
205+ resources :
206+ limits :
207+ memory : 768mb
186208 restart : unless-stopped
187209 networks : [fluxer]
188210 environment :
189211 MEILI_ENV : production
190212 MEILI_NO_ANALYTICS : " true"
213+ MEILI_MAX_INDEXING_MEMORY : 384mb
191214 MEILI_MASTER_KEY : ${MEILI_MASTER_KEY:?set MEILI_MASTER_KEY in .env}
192215 volumes :
193216 - meilisearch-data:/meili_data
194217
195218 seaweedfs :
196219 image : chrislusf/seaweedfs:4.34
220+ deploy :
221+ resources :
222+ limits :
223+ memory : 512mb
197224 restart : unless-stopped
198225 networks : [fluxer]
199226 command : ["server", "-s3", "-dir=/data"]
@@ -202,6 +229,10 @@ services:
202229
203230 seaweedfs-init :
204231 image : chrislusf/seaweedfs:4.34
232+ deploy :
233+ resources :
234+ limits :
235+ memory : 128mb
205236 networks : [fluxer]
206237 depends_on : [seaweedfs]
207238 restart : " no"
@@ -235,6 +266,10 @@ services:
235266
236267 livekit :
237268 image : livekit/livekit-server:v1.12.0
269+ deploy :
270+ resources :
271+ limits :
272+ memory : 512mb
238273 restart : unless-stopped
239274 networks : [fluxer]
240275 command : ["--config", "/etc/livekit.yaml"]
@@ -249,6 +284,12 @@ services:
249284 api :
250285 << : *fluxer-service
251286 image : ${FLUXER_REGISTRY:-ghcr.io/${FLUXER_REGISTRY_OWNER:-fluxerapp}}/fluxer-api:${FLUXER_IMAGE_TAG:-v1}
287+ deploy :
288+ resources :
289+ limits :
290+ memory : 1536mb
291+ reservations :
292+ memory : 512mb
252293 environment :
253294 << : *fluxer-env
254295 FLUXER_API_PORT : " 8080"
@@ -279,6 +320,10 @@ services:
279320 worker :
280321 << : *fluxer-service
281322 image : ${FLUXER_REGISTRY:-ghcr.io/${FLUXER_REGISTRY_OWNER:-fluxerapp}}/fluxer-api:${FLUXER_IMAGE_TAG:-v1}
323+ deploy :
324+ resources :
325+ limits :
326+ memory : 1536mb
282327 working_dir : /usr/src/app/fluxer_api
283328 command : ["./node_modules/.bin/tsx", "src/WorkerEntrypoint.ts"]
284329 environment :
@@ -299,6 +344,12 @@ services:
299344 gateway :
300345 << : *fluxer-service
301346 image : ${FLUXER_REGISTRY:-ghcr.io/${FLUXER_REGISTRY_OWNER:-fluxerapp}}/fluxer-gateway:${FLUXER_IMAGE_TAG:-v1}
347+ deploy :
348+ resources :
349+ limits :
350+ memory : 1gb
351+ reservations :
352+ memory : 384mb
302353 environment :
303354 << : *fluxer-env
304355 FLUXER_GATEWAY_PORT : " 8080"
@@ -318,6 +369,10 @@ services:
318369 media-proxy :
319370 << : *fluxer-service
320371 image : ${FLUXER_REGISTRY:-ghcr.io/${FLUXER_REGISTRY_OWNER:-fluxerapp}}/fluxer-media-proxy:${FLUXER_IMAGE_TAG:-v1}
372+ deploy :
373+ resources :
374+ limits :
375+ memory : 512mb
321376 environment :
322377 << : *fluxer-env
323378 FLUXER_MEDIA_PROXY_HOST : 0.0.0.0
@@ -333,10 +388,18 @@ services:
333388 static-proxy :
334389 << : *fluxer-service
335390 image : ${FLUXER_REGISTRY:-ghcr.io/${FLUXER_REGISTRY_OWNER:-fluxerapp}}/fluxer-static:${FLUXER_IMAGE_TAG:-v1}
391+ deploy :
392+ resources :
393+ limits :
394+ memory : 256mb
336395
337396 app-proxy :
338397 << : *fluxer-service
339398 image : ${FLUXER_REGISTRY:-ghcr.io/${FLUXER_REGISTRY_OWNER:-fluxerapp}}/fluxer-app-proxy-self-hosted:${FLUXER_IMAGE_TAG:-v1}
399+ deploy :
400+ resources :
401+ limits :
402+ memory : 256mb
340403 environment :
341404 FLUXER_APP_PROXY_HOST : 0.0.0.0
342405 FLUXER_APP_PROXY_PORT : " 8080"
@@ -363,6 +426,10 @@ services:
363426 snowflakes :
364427 << : *fluxer-service
365428 image : ${FLUXER_REGISTRY:-ghcr.io/${FLUXER_REGISTRY_OWNER:-fluxerapp}}/fluxer-snowflakes:${FLUXER_IMAGE_TAG:-v1}
429+ deploy :
430+ resources :
431+ limits :
432+ memory : 128mb
366433 environment :
367434 << : *fluxer-env
368435 FLUXER_SVC_NAME : snowflakes
@@ -373,6 +440,10 @@ services:
373440 snowflakes-shard :
374441 << : *fluxer-service
375442 image : ${FLUXER_REGISTRY:-ghcr.io/${FLUXER_REGISTRY_OWNER:-fluxerapp}}/fluxer-snowflakes:${FLUXER_IMAGE_TAG:-v1}
443+ deploy :
444+ resources :
445+ limits :
446+ memory : 256mb
376447 environment :
377448 << : *fluxer-env
378449 FLUXER_SVC_NAME : snowflakes
@@ -384,6 +455,10 @@ services:
384455 users :
385456 << : *fluxer-service
386457 image : ${FLUXER_REGISTRY:-ghcr.io/${FLUXER_REGISTRY_OWNER:-fluxerapp}}/fluxer-users:${FLUXER_IMAGE_TAG:-v1}
458+ deploy :
459+ resources :
460+ limits :
461+ memory : 128mb
387462 environment :
388463 << : *fluxer-env
389464 FLUXER_SVC_MODE : router
@@ -393,6 +468,10 @@ services:
393468 users-shard :
394469 << : *fluxer-service
395470 image : ${FLUXER_REGISTRY:-ghcr.io/${FLUXER_REGISTRY_OWNER:-fluxerapp}}/fluxer-users:${FLUXER_IMAGE_TAG:-v1}
471+ deploy :
472+ resources :
473+ limits :
474+ memory : 256mb
396475 environment :
397476 << : *fluxer-env
398477 FLUXER_SVC_MODE : shard
@@ -406,6 +485,10 @@ services:
406485 gifs :
407486 << : *fluxer-service
408487 image : ${FLUXER_REGISTRY:-ghcr.io/${FLUXER_REGISTRY_OWNER:-fluxerapp}}/fluxer-gifs:${FLUXER_IMAGE_TAG:-v1}
488+ deploy :
489+ resources :
490+ limits :
491+ memory : 128mb
409492 environment :
410493 << : *fluxer-env
411494 FLUXER_SVC_NAME : gifs
@@ -417,6 +500,10 @@ services:
417500 gifs-shard :
418501 << : *fluxer-service
419502 image : ${FLUXER_REGISTRY:-ghcr.io/${FLUXER_REGISTRY_OWNER:-fluxerapp}}/fluxer-gifs:${FLUXER_IMAGE_TAG:-v1}
503+ deploy :
504+ resources :
505+ limits :
506+ memory : 256mb
420507 environment :
421508 << : *fluxer-env
422509 FLUXER_SVC_NAME : gifs
@@ -429,6 +516,10 @@ services:
429516 messages :
430517 << : *fluxer-service
431518 image : ${FLUXER_REGISTRY:-ghcr.io/${FLUXER_REGISTRY_OWNER:-fluxerapp}}/fluxer-messages:${FLUXER_IMAGE_TAG:-v1}
519+ deploy :
520+ resources :
521+ limits :
522+ memory : 128mb
432523 environment :
433524 << : *fluxer-env
434525 FLUXER_SVC_NAME : messages
@@ -439,6 +530,10 @@ services:
439530 messages-shard :
440531 << : *fluxer-service
441532 image : ${FLUXER_REGISTRY:-ghcr.io/${FLUXER_REGISTRY_OWNER:-fluxerapp}}/fluxer-messages:${FLUXER_IMAGE_TAG:-v1}
533+ deploy :
534+ resources :
535+ limits :
536+ memory : 256mb
442537 environment :
443538 << : *fluxer-env
444539 FLUXER_SVC_NAME : messages
@@ -453,6 +548,10 @@ services:
453548 unfurl :
454549 << : *fluxer-service
455550 image : ${FLUXER_REGISTRY:-ghcr.io/${FLUXER_REGISTRY_OWNER:-fluxerapp}}/fluxer-unfurl:${FLUXER_IMAGE_TAG:-v1}
551+ deploy :
552+ resources :
553+ limits :
554+ memory : 128mb
456555 environment :
457556 << : *fluxer-env
458557 FLUXER_SVC_MODE : router
@@ -462,6 +561,10 @@ services:
462561 unfurl-shard :
463562 << : *fluxer-service
464563 image : ${FLUXER_REGISTRY:-ghcr.io/${FLUXER_REGISTRY_OWNER:-fluxerapp}}/fluxer-unfurl:${FLUXER_IMAGE_TAG:-v1}
564+ deploy :
565+ resources :
566+ limits :
567+ memory : 256mb
465568 environment :
466569 << : *fluxer-env
467570 FLUXER_SVC_MODE : shard
@@ -472,6 +575,10 @@ services:
472575 admin :
473576 << : *fluxer-service
474577 image : ${FLUXER_REGISTRY:-ghcr.io/${FLUXER_REGISTRY_OWNER:-fluxerapp}}/fluxer-admin:${FLUXER_IMAGE_TAG:-v1}
578+ deploy :
579+ resources :
580+ limits :
581+ memory : 256mb
475582 environment :
476583 << : *fluxer-env
477584 FLUXER_ADMIN_HOST : 0.0.0.0
0 commit comments