fixed network issue with multiple managed rooms
This commit is contained in:
28
cfg/sample/ctrl/start.sh
Executable file
28
cfg/sample/ctrl/start.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
# Start all sample services
|
||||
# Usage: ./ctrl/start.sh [-d]
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
ROOT_DIR="$(dirname "$SCRIPT_DIR")"
|
||||
|
||||
DETACH=""
|
||||
if [[ "$1" == "-d" ]]; then
|
||||
DETACH="-d"
|
||||
fi
|
||||
|
||||
echo "=== Starting sample services ==="
|
||||
|
||||
# Start soleprint
|
||||
echo "Starting soleprint..."
|
||||
cd "$ROOT_DIR/soleprint"
|
||||
docker compose up $DETACH &
|
||||
|
||||
# Start sample app
|
||||
if [[ -f "$ROOT_DIR/sample/docker-compose.yml" ]]; then
|
||||
echo "Starting sample app..."
|
||||
cd "$ROOT_DIR/sample"
|
||||
docker compose up $DETACH &
|
||||
fi
|
||||
|
||||
wait
|
||||
echo "=== All services started ==="
|
||||
22
cfg/sample/ctrl/stop.sh
Executable file
22
cfg/sample/ctrl/stop.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
# Stop all sample services
|
||||
# Usage: ./ctrl/stop.sh
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
ROOT_DIR="$(dirname "$SCRIPT_DIR")"
|
||||
|
||||
echo "=== Stopping sample services ==="
|
||||
|
||||
# Stop sample app
|
||||
if [[ -f "$ROOT_DIR/sample/docker-compose.yml" ]]; then
|
||||
echo "Stopping sample app..."
|
||||
cd "$ROOT_DIR/sample"
|
||||
docker compose down
|
||||
fi
|
||||
|
||||
# Stop soleprint
|
||||
echo "Stopping soleprint..."
|
||||
cd "$ROOT_DIR/soleprint"
|
||||
docker compose down
|
||||
|
||||
echo "=== All services stopped ==="
|
||||
Reference in New Issue
Block a user