2022-08-26 16:03:32 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
CMD="$1"
|
|
|
|
if [ -z "$1" ]; then
|
|
|
|
CMD="start"
|
|
|
|
fi
|
|
|
|
|
|
|
|
start_server() {
|
2022-08-26 17:34:55 +02:00
|
|
|
docker-compose up -d stable-diffusion-old-port-redirect > /dev/null 2>&1 # old port 8000 server, show redirect notice
|
|
|
|
docker-compose up stability-ai stable-diffusion-ui &
|
2022-08-26 16:03:32 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
stop_server() {
|
|
|
|
docker-compose down
|
|
|
|
}
|
|
|
|
|
|
|
|
if [ "$CMD" == "start" ]; then
|
|
|
|
start_server
|
|
|
|
elif [ "$CMD" == "stop" ]; then
|
|
|
|
stop_server
|
|
|
|
elif [ "$CMD" == "restart" ]; then
|
|
|
|
stop_server
|
|
|
|
start_server
|
|
|
|
else
|
|
|
|
echo "Unknown option: $1 (Expected start or stop)"
|
|
|
|
fi
|