Skip to content

Commit 663a13c

Browse files
committed
Fix Docker Compose execution for new docker group members
1 parent 86bf1a8 commit 663a13c

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

install.sh

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ install_docker(){
107107

108108
# Apply group change in current shell
109109
newgrp docker <<EONG
110-
echo "✅ Docker is installed and group membership applied in this session."
110+
echo "✅ Docker is installed and group membership applied."
111111
EONG
112112
fi
113113
}
@@ -500,7 +500,12 @@ if [ "$answer" = "n" ]; then
500500
exit 0
501501
else
502502
echo "🐳 Starting Docker containers..."
503-
sudo docker compose up -d
503+
if [[ $(uname) == "Darwin" ]]; then
504+
docker compose up -d
505+
else
506+
sg docker -c "docker compose up -d"
507+
fi
508+
504509
# Check if port is listening
505510
echo "Waiting for server to be healthy, it might take a few minutes while we initialize the database..."
506511

@@ -514,8 +519,13 @@ else
514519
# Tail logs of the server until it's ready
515520
# Start logs with timeout (will automatically stop after N seconds)
516521
#docker compose logs -f fineract-server &
517-
sudo docker compose logs -f fineract-server &
518-
log_pid=$!
522+
if [[ $(uname) == "Darwin" ]]; then
523+
docker compose logs -f fineract-server &
524+
log_pid=$!
525+
else
526+
sg docker -c "docker compose logs -f fineract-server" &
527+
log_pid=$!
528+
fi
519529

520530
while [ "$(docker inspect --format='{{.State.Health.Status}}' "$container_id" 2>/dev/null)" != "healthy" ]; do
521531
sleep 1

0 commit comments

Comments
 (0)