Skip to content

Commit 0eba516

Browse files
committed
k
1 parent f9bf15b commit 0eba516

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

deployment/docker_compose/install.sh

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
set -e
44

5+
# Expected resource requirements
6+
EXPECTED_DOCKER_RAM_GB=10
7+
EXPECTED_DISK_GB=32
8+
59
# Parse command line arguments
610
SHUTDOWN_MODE=false
711
DELETE_DATA_MODE=false
@@ -292,19 +296,21 @@ print_info "Available disk space: ${DISK_AVAILABLE}GB"
292296

293297
# Resource requirements check
294298
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)"
297303
RESOURCE_WARNING=true
298304
fi
299305

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)"
302308
RESOURCE_WARNING=true
303309
fi
304310

305311
if [ "$RESOURCE_WARNING" = true ]; then
306312
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."
308314
echo ""
309315
read -p "Do you want to continue anyway? (y/N): " -n 1 -r
310316
echo ""

0 commit comments

Comments
 (0)