File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed
deployment/docker_compose Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change 2
2
3
3
set -e
4
4
5
+ # Expected resource requirements
6
+ EXPECTED_DOCKER_RAM_GB=10
7
+ EXPECTED_DISK_GB=32
8
+
5
9
# Parse command line arguments
6
10
SHUTDOWN_MODE=false
7
11
DELETE_DATA_MODE=false
@@ -292,19 +296,21 @@ print_info "Available disk space: ${DISK_AVAILABLE}GB"
292
296
293
297
# Resource requirements check
294
298
RESOURCE_WARNING=false
295
- if [ " $MEMORY_MB " -gt 0 ] && [ " $MEMORY_MB " -lt 16384 ]; then
296
- print_warning " Docker has less than 16GB RAM allocated (found: ~${MEMORY_GB} GB)"
299
+ EXPECTED_RAM_MB=$(( EXPECTED_DOCKER_RAM_GB * 1024 ))
300
+
301
+ if [ " $MEMORY_MB " -gt 0 ] && [ " $MEMORY_MB " -lt " $EXPECTED_RAM_MB " ]; then
302
+ print_warning " Docker has less than ${EXPECTED_DOCKER_RAM_GB} GB RAM allocated (found: ~${MEMORY_GB} GB)"
297
303
RESOURCE_WARNING=true
298
304
fi
299
305
300
- if [ " $DISK_AVAILABLE " -lt 50 ]; then
301
- print_warning " Less than 50GB disk space available (found: ${DISK_AVAILABLE} GB)"
306
+ if [ " $DISK_AVAILABLE " -lt " $EXPECTED_DISK_GB " ]; then
307
+ print_warning " Less than ${EXPECTED_DISK_GB} GB disk space available (found: ${DISK_AVAILABLE} GB)"
302
308
RESOURCE_WARNING=true
303
309
fi
304
310
305
311
if [ " $RESOURCE_WARNING " = true ]; then
306
312
echo " "
307
- print_warning " Onyx recommends at least 16GB RAM and 50GB disk space for optimal performance."
313
+ print_warning " Onyx recommends at least ${EXPECTED_DOCKER_RAM_GB} GB RAM and ${EXPECTED_DISK_GB} GB disk space for optimal performance."
308
314
echo " "
309
315
read -p " Do you want to continue anyway? (y/N): " -n 1 -r
310
316
echo " "
You can’t perform that action at this time.
0 commit comments