File tree Expand file tree Collapse file tree 1 file changed +30
-2
lines changed
Expand file tree Collapse file tree 1 file changed +30
-2
lines changed Original file line number Diff line number Diff line change @@ -84,8 +84,36 @@ mkdir -p "$tmp"/usr/bin
8484makefile root:root 0755 " $tmp " /usr/bin/alpdock-run-compose << EOF
8585#!/bin/sh
8686
87- wget https://github.com/vanderstack/vanderstack-docker-server/raw/main/docker-compose.yml
88- docker-compose up -d
87+ # Variables
88+ COMPOSE_URL="https://github.com/vanderstack/vanderstack-docker-server/raw/main/docker-compose.yml"
89+ COMPOSE_DIR="/var/docker"
90+
91+ # Ensure Docker is running
92+ echo "Waiting for Docker to start..."
93+ while ! docker info >/dev/null 2>&1; do
94+ sleep 2
95+ done
96+ echo "Docker is running."
97+
98+ # Create directory for docker-compose file
99+ mkdir -p "$COMPOSE_DIR "
100+ cd "$COMPOSE_DIR " || exit 1
101+
102+ # Download the docker-compose.yml file
103+ echo "Downloading docker-compose.yml..."
104+ if ! wget -O docker-compose.yml "$COMPOSE_URL "; then
105+ echo "Error: Failed to download docker-compose.yml from $COMPOSE_URL ."
106+ exit 1
107+ fi
108+
109+ # Start services with docker-compose
110+ echo "Starting services with docker-compose..."
111+ if ! docker-compose up -d; then
112+ echo "Error: Failed to start services with docker-compose."
113+ exit 1
114+ fi
115+
116+ echo "Services started successfully."
89117EOF
90118
91119rc_add devfs sysinit
You can’t perform that action at this time.
0 commit comments