File tree Expand file tree Collapse file tree 3 files changed +16
-5
lines changed
ansible/roles/tldraw-server Expand file tree Collapse file tree 3 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -3,4 +3,9 @@ TLDRAW_LOG_LEVEL: "error"
33TLDRAW_METRICS_COLLECT_DEFAULT : " true"
44TLDRAW_ASSETS_ENABLED : " true"
55TLDRAW_WEBSOCKET_PATH : " /tldraw-server"
6- NOT_AUTHENTICATED_REDIRECT_URL : " https://{{ DOMAIN }}/login"
6+ NOT_AUTHENTICATED_REDIRECT_URL : " https://{{ DOMAIN }}/login"
7+
8+ TLDRAW_SERVER_MEMORY_LIMITS : " 2Gi"
9+ TLDRAW_SERVER_MEMORY_REQUESTS : " 2Gi"
10+ TLDRAW_SERVER_WORKER_MEMORY_LIMITS : " 2Gi"
11+ TLDRAW_SERVER_WORKER_MEMORY_REQUESTS : " 150Mi"
Original file line number Diff line number Diff line change 6363 - containerPort: 9090
6464 name: metrics
6565 protocol: TCP
66+ env:
67+ - name: NODE_OPTIONS
68+ value: "--max-old-space-size={{ ((TLDRAW_SERVER_MEMORY_LIMITS | regex_replace('Gi', '')|int * 1024 * 0.8)|int) }}"
6669 envFrom:
6770 - configMapRef:
6871 name: tldraw-server-configmap
@@ -73,10 +76,10 @@ spec:
7376 resources:
7477 limits:
7578 cpu: {{ TLDRAW_SERVER_CPU_LIMITS|default("2000m", true) }}
76- memory: {{ TLDRAW_SERVER_MEMORY_LIMITS|default("2Gi", true) }}
79+ memory: {{ TLDRAW_SERVER_MEMORY_LIMITS }}
7780 requests:
7881 cpu: {{ TLDRAW_SERVER_CPU_REQUESTS|default("100m", true) }}
79- memory: {{ TLDRAW_SERVER_MEMORY_REQUESTS|default("150Mi", true) }}
82+ memory: {{ TLDRAW_SERVER_MEMORY_REQUESTS }}
8083{% if AFFINITY_ENABLE is defined and AFFINITY_ENABLE |bool %}
8184 affinity:
8285 podAffinity:
Original file line number Diff line number Diff line change 5353 - name: tldraw-worker
5454 image: {{ TLDRAW_SERVER_IMAGE }}:{{ TLDRAW_SERVER_IMAGE_TAG }}
5555 imagePullPolicy: IfNotPresent
56+ env:
57+ - name: NODE_OPTIONS
58+ value: "--max-old-space-size={{ ((TLDRAW_SERVER_WORKER_MEMORY_LIMITS | regex_replace('Gi', '')|int * 1024 * 0.8)|int) }}"
5659 envFrom:
5760 - configMapRef:
5861 name: tldraw-server-configmap
@@ -64,10 +67,10 @@ spec:
6467 resources:
6568 limits:
6669 cpu: {{ TLDRAW_SERVER_WORKER_CPU_LIMITS|default("2000m", true) }}
67- memory: {{ TLDRAW_SERVER_WORKER_MEMORY_LIMITS|default("2Gi", true) }}
70+ memory: {{ TLDRAW_SERVER_WORKER_MEMORY_LIMITS }}
6871 requests:
6972 cpu: {{ TLDRAW_SERVER_WORKER_CPU_REQUESTS|default("100m", true) }}
70- memory: {{ TLDRAW_SERVER_WORKER_MEMORY_REQUESTS|default("150Mi", true) }}
73+ memory: {{ TLDRAW_SERVER_WORKER_MEMORY_REQUESTS }}
7174{% if AFFINITY_ENABLE is defined and AFFINITY_ENABLE |bool %}
7275 affinity:
7376 podAffinity:
You can’t perform that action at this time.
0 commit comments