@@ -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 :
@@ -118,6 +122,12 @@ services:
118122
119123 postgres :
120124 image : postgres:16-alpine
125+ deploy :
126+ resources :
127+ limits :
128+ memory : 2gb
129+ reservations :
130+ memory : 768mb
121131 restart : unless-stopped
122132 networks : [fluxer]
123133 command : >
@@ -159,9 +169,13 @@ services:
159169
160170 valkey :
161171 image : valkey/valkey:8.1-alpine
172+ deploy :
173+ resources :
174+ limits :
175+ memory : 256mb
162176 restart : unless-stopped
163177 networks : [fluxer]
164- command : ["valkey-server", "--save", "", "--appendonly", "no"]
178+ command : ["valkey-server", "--save", "", "--appendonly", "no", "--maxmemory", "192mb", "--maxmemory-policy", "allkeys-lru" ]
165179 healthcheck :
166180 test : ["CMD", "valkey-cli", "ping"]
167181 interval : 10s
@@ -170,6 +184,10 @@ services:
170184
171185 nats :
172186 image : nats:2.14-alpine
187+ deploy :
188+ resources :
189+ limits :
190+ memory : 256mb
173191 restart : unless-stopped
174192 networks : [fluxer]
175193 command : ["-js", "-sd", "/data", "-m", "8222"]
@@ -178,17 +196,26 @@ services:
178196
179197 meilisearch :
180198 image : getmeili/meilisearch:v1.12
199+ deploy :
200+ resources :
201+ limits :
202+ memory : 768mb
181203 restart : unless-stopped
182204 networks : [fluxer]
183205 environment :
184206 MEILI_ENV : production
185207 MEILI_NO_ANALYTICS : " true"
208+ MEILI_MAX_INDEXING_MEMORY : 384mb
186209 MEILI_MASTER_KEY : ${MEILI_MASTER_KEY:?set MEILI_MASTER_KEY in .env}
187210 volumes :
188211 - meilisearch-data:/meili_data
189212
190213 seaweedfs :
191214 image : chrislusf/seaweedfs:4.34
215+ deploy :
216+ resources :
217+ limits :
218+ memory : 512mb
192219 restart : unless-stopped
193220 networks : [fluxer]
194221 command : ["server", "-s3", "-dir=/data"]
@@ -197,6 +224,10 @@ services:
197224
198225 seaweedfs-init :
199226 image : chrislusf/seaweedfs:4.34
227+ deploy :
228+ resources :
229+ limits :
230+ memory : 128mb
200231 networks : [fluxer]
201232 depends_on : [seaweedfs]
202233 restart : " no"
@@ -230,6 +261,10 @@ services:
230261
231262 livekit :
232263 image : livekit/livekit-server:v1.12.0
264+ deploy :
265+ resources :
266+ limits :
267+ memory : 512mb
233268 restart : unless-stopped
234269 networks : [fluxer]
235270 command : ["--config", "/etc/livekit.yaml"]
@@ -244,6 +279,12 @@ services:
244279 api :
245280 << : *fluxer-service
246281 image : ${FLUXER_REGISTRY:-ghcr.io/${FLUXER_REGISTRY_OWNER:-fluxerapp}}/fluxer-api:${FLUXER_IMAGE_TAG:-v1}
282+ deploy :
283+ resources :
284+ limits :
285+ memory : 1536mb
286+ reservations :
287+ memory : 512mb
247288 environment :
248289 << : *fluxer-env
249290 FLUXER_API_PORT : " 8080"
@@ -273,6 +314,10 @@ services:
273314 worker :
274315 << : *fluxer-service
275316 image : ${FLUXER_REGISTRY:-ghcr.io/${FLUXER_REGISTRY_OWNER:-fluxerapp}}/fluxer-api:${FLUXER_IMAGE_TAG:-v1}
317+ deploy :
318+ resources :
319+ limits :
320+ memory : 1536mb
276321 working_dir : /usr/src/app/fluxer_api
277322 command : ["./node_modules/.bin/tsx", "src/WorkerEntrypoint.ts"]
278323 environment :
@@ -293,6 +338,12 @@ services:
293338 gateway :
294339 << : *fluxer-service
295340 image : ${FLUXER_REGISTRY:-ghcr.io/${FLUXER_REGISTRY_OWNER:-fluxerapp}}/fluxer-gateway:${FLUXER_IMAGE_TAG:-v1}
341+ deploy :
342+ resources :
343+ limits :
344+ memory : 1gb
345+ reservations :
346+ memory : 384mb
296347 environment :
297348 << : *fluxer-env
298349 FLUXER_GATEWAY_PORT : " 8080"
@@ -306,6 +357,10 @@ services:
306357 media-proxy :
307358 << : *fluxer-service
308359 image : ${FLUXER_REGISTRY:-ghcr.io/${FLUXER_REGISTRY_OWNER:-fluxerapp}}/fluxer-media-proxy:${FLUXER_IMAGE_TAG:-v1}
360+ deploy :
361+ resources :
362+ limits :
363+ memory : 512mb
309364 environment :
310365 << : *fluxer-env
311366 FLUXER_MEDIA_PROXY_HOST : 0.0.0.0
@@ -321,10 +376,18 @@ services:
321376 static-proxy :
322377 << : *fluxer-service
323378 image : ${FLUXER_REGISTRY:-ghcr.io/${FLUXER_REGISTRY_OWNER:-fluxerapp}}/fluxer-static:${FLUXER_IMAGE_TAG:-v1}
379+ deploy :
380+ resources :
381+ limits :
382+ memory : 256mb
324383
325384 app-proxy :
326385 << : *fluxer-service
327386 image : ${FLUXER_REGISTRY:-ghcr.io/${FLUXER_REGISTRY_OWNER:-fluxerapp}}/fluxer-app-proxy-self-hosted:${FLUXER_IMAGE_TAG:-v1}
387+ deploy :
388+ resources :
389+ limits :
390+ memory : 256mb
328391 environment :
329392 FLUXER_APP_PROXY_HOST : 0.0.0.0
330393 FLUXER_APP_PROXY_PORT : " 8080"
@@ -351,6 +414,10 @@ services:
351414 snowflakes :
352415 << : *fluxer-service
353416 image : ${FLUXER_REGISTRY:-ghcr.io/${FLUXER_REGISTRY_OWNER:-fluxerapp}}/fluxer-snowflakes:${FLUXER_IMAGE_TAG:-v1}
417+ deploy :
418+ resources :
419+ limits :
420+ memory : 128mb
354421 environment :
355422 << : *fluxer-env
356423 FLUXER_SVC_NAME : snowflakes
@@ -361,6 +428,10 @@ services:
361428 snowflakes-shard :
362429 << : *fluxer-service
363430 image : ${FLUXER_REGISTRY:-ghcr.io/${FLUXER_REGISTRY_OWNER:-fluxerapp}}/fluxer-snowflakes:${FLUXER_IMAGE_TAG:-v1}
431+ deploy :
432+ resources :
433+ limits :
434+ memory : 256mb
364435 environment :
365436 << : *fluxer-env
366437 FLUXER_SVC_NAME : snowflakes
@@ -372,6 +443,10 @@ services:
372443 users :
373444 << : *fluxer-service
374445 image : ${FLUXER_REGISTRY:-ghcr.io/${FLUXER_REGISTRY_OWNER:-fluxerapp}}/fluxer-users:${FLUXER_IMAGE_TAG:-v1}
446+ deploy :
447+ resources :
448+ limits :
449+ memory : 128mb
375450 environment :
376451 << : *fluxer-env
377452 FLUXER_SVC_MODE : router
@@ -381,6 +456,10 @@ services:
381456 users-shard :
382457 << : *fluxer-service
383458 image : ${FLUXER_REGISTRY:-ghcr.io/${FLUXER_REGISTRY_OWNER:-fluxerapp}}/fluxer-users:${FLUXER_IMAGE_TAG:-v1}
459+ deploy :
460+ resources :
461+ limits :
462+ memory : 256mb
384463 environment :
385464 << : *fluxer-env
386465 FLUXER_SVC_MODE : shard
@@ -394,6 +473,10 @@ services:
394473 gifs :
395474 << : *fluxer-service
396475 image : ${FLUXER_REGISTRY:-ghcr.io/${FLUXER_REGISTRY_OWNER:-fluxerapp}}/fluxer-gifs:${FLUXER_IMAGE_TAG:-v1}
476+ deploy :
477+ resources :
478+ limits :
479+ memory : 128mb
397480 environment :
398481 << : *fluxer-env
399482 FLUXER_SVC_NAME : gifs
@@ -405,6 +488,10 @@ services:
405488 gifs-shard :
406489 << : *fluxer-service
407490 image : ${FLUXER_REGISTRY:-ghcr.io/${FLUXER_REGISTRY_OWNER:-fluxerapp}}/fluxer-gifs:${FLUXER_IMAGE_TAG:-v1}
491+ deploy :
492+ resources :
493+ limits :
494+ memory : 256mb
408495 environment :
409496 << : *fluxer-env
410497 FLUXER_SVC_NAME : gifs
@@ -417,6 +504,10 @@ services:
417504 messages :
418505 << : *fluxer-service
419506 image : ${FLUXER_REGISTRY:-ghcr.io/${FLUXER_REGISTRY_OWNER:-fluxerapp}}/fluxer-messages:${FLUXER_IMAGE_TAG:-v1}
507+ deploy :
508+ resources :
509+ limits :
510+ memory : 128mb
420511 environment :
421512 << : *fluxer-env
422513 FLUXER_SVC_NAME : messages
@@ -427,6 +518,10 @@ services:
427518 messages-shard :
428519 << : *fluxer-service
429520 image : ${FLUXER_REGISTRY:-ghcr.io/${FLUXER_REGISTRY_OWNER:-fluxerapp}}/fluxer-messages:${FLUXER_IMAGE_TAG:-v1}
521+ deploy :
522+ resources :
523+ limits :
524+ memory : 256mb
430525 environment :
431526 << : *fluxer-env
432527 FLUXER_SVC_NAME : messages
@@ -441,6 +536,10 @@ services:
441536 unfurl :
442537 << : *fluxer-service
443538 image : ${FLUXER_REGISTRY:-ghcr.io/${FLUXER_REGISTRY_OWNER:-fluxerapp}}/fluxer-unfurl:${FLUXER_IMAGE_TAG:-v1}
539+ deploy :
540+ resources :
541+ limits :
542+ memory : 128mb
444543 environment :
445544 << : *fluxer-env
446545 FLUXER_SVC_MODE : router
@@ -450,6 +549,10 @@ services:
450549 unfurl-shard :
451550 << : *fluxer-service
452551 image : ${FLUXER_REGISTRY:-ghcr.io/${FLUXER_REGISTRY_OWNER:-fluxerapp}}/fluxer-unfurl:${FLUXER_IMAGE_TAG:-v1}
552+ deploy :
553+ resources :
554+ limits :
555+ memory : 256mb
453556 environment :
454557 << : *fluxer-env
455558 FLUXER_SVC_MODE : shard
@@ -460,6 +563,10 @@ services:
460563 admin :
461564 << : *fluxer-service
462565 image : ${FLUXER_REGISTRY:-ghcr.io/${FLUXER_REGISTRY_OWNER:-fluxerapp}}/fluxer-admin:${FLUXER_IMAGE_TAG:-v1}
566+ deploy :
567+ resources :
568+ limits :
569+ memory : 256mb
463570 environment :
464571 << : *fluxer-env
465572 FLUXER_ADMIN_HOST : 0.0.0.0
0 commit comments