|
|
|
@ -36,13 +36,13 @@ do_install_detail() {
|
|
|
|
|
# Create Docker Compose file with custom variables
|
|
|
|
|
|
|
|
|
|
# Create Docker Compose file with custom variables
|
|
|
|
|
touch docker-compose.yml
|
|
|
|
|
cat > docker-compose.yml <<EOF
|
|
|
|
|
touch /root/docker-compose/searxng-app/docker-compose.yml
|
|
|
|
|
cat > /root/docker-compose/searxng-app/docker-compose.yml <<EOF
|
|
|
|
|
version: '3.7'
|
|
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
searxng:
|
|
|
|
|
image: paulgoio/searxng:production
|
|
|
|
|
image: $IMAGE_NAME
|
|
|
|
|
restart: always
|
|
|
|
|
ports:
|
|
|
|
|
- ${LAN_IP}:$port:8080
|
|
|
|
@ -67,7 +67,7 @@ services:
|
|
|
|
|
plugsy.link: "http://${LAN_IP}:$port"
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
|
|
docker-compose up -d
|
|
|
|
|
dockerdeploy searxng-app
|
|
|
|
|
|
|
|
|
|
# Add a new list option to the "shortcutmenu" configuration file
|
|
|
|
|
uci add shortcutmenu lists
|
|
|
|
@ -98,16 +98,21 @@ case ${ACTION} in
|
|
|
|
|
do_install_detail
|
|
|
|
|
;;
|
|
|
|
|
"rm")
|
|
|
|
|
docker ps -a --filter "$IMAGE_NAME" --format '{{.ID}}' | xargs -r docker stop && docker ps -a --filter "$IMAGE_NAME" --format '{{.ID}}' | xargs -r docker rm && docker rmi $IMAGE_NAME
|
|
|
|
|
|
|
|
|
|
docker rm -f searxng
|
|
|
|
|
;;
|
|
|
|
|
"start" | "stop" | "restart")
|
|
|
|
|
docker ${ACTION} searxng
|
|
|
|
|
CONTAINER_IDS=$(docker ps -a --filter "ancestor=${IMAGE_NAME}" --format '{{.ID}}')
|
|
|
|
|
docker ${ACTION} ${ID}
|
|
|
|
|
;;
|
|
|
|
|
"status")
|
|
|
|
|
docker ps --all -f 'name=searxng' --format '{{.State}}'
|
|
|
|
|
CONTAINER_NAMES=$(docker ps -a --filter "ancestor=${IMAGE_NAME}" --format '{{.Names}}')
|
|
|
|
|
docker ps --all -f "name=${NAME}" --format '{{.Status}}'
|
|
|
|
|
;;
|
|
|
|
|
"port")
|
|
|
|
|
docker ps --all -f 'name=searxng' --format '{{.Ports}}' | grep -om1 '0.0.0.0:[0-9]*' | sed 's/0.0.0.0://'
|
|
|
|
|
CONTAINER_NAMES=$(docker ps -a --filter "ancestor=${IMAGE_NAME}" --format '{{.Names}}')
|
|
|
|
|
docker ps --all -f "name=${NAME}" --format '{{.Ports}}' | grep -om1 '0.0.0.0:[0-9]*' | sed 's/0.0.0.0://'
|
|
|
|
|
;;
|
|
|
|
|
*)
|
|
|
|
|
usage
|
|
|
|
|