Skip to content

Feature Request: Updating Periphery via the Comodo admin panel #1586

Open

Description

@EldrikFind
  • Add a Periphery update button for each server separately
  • Bulk update in the servers tab when selecting multiple servers

Activity

  1. EldrikFind commented on Aug 14, 2026

    @EldrikFind
    Author

    It's very inconvenient to update one by one, especially as the number of servers grows.

  2. StNiosem commented on Aug 16, 2026

    @StNiosem

    How could this be done for people who use a Periphery that's not in docker? Would Periphery gain the ability to run commands (in this case:

    curl -sSL https://raw.githubusercontent.com/moghtech/komodo/main/scripts/setup-periphery.py \
      | python3 -
  3. SadParad1se commented on Oct 13, 2026

    @SadParad1se

    I'm running Komodo with Docker Compose. I have the compose.yaml in a Git repository (Renovate notifies me about new versions) and added it as a stack. To overcome issues with the periphery container, I've vibecoded the following script and updated the stack config.

    compose_cmd_wrapper = "sh ./redeploy.sh [[COMPOSE_COMMAND]]"
    compose_cmd_wrapper_include = ["up"]

    The script parses stack information and launches a standalone container to execute the command from Komodo. This way, you have access to all Komodo features.

    #!/bin/sh
    set -eu
    
    fail() {
        printf '%s\n' "Komodo redeploy: $*" >&2
        exit 1
    }
    
    docker_local() {
        docker --host unix:///var/run/docker.sock "$@"
    }
    
    # Komodo's [[COMPOSE_COMMAND]] placeholder supplies the command arguments to execute inside the helper.
    [ "$#" -gt 0 ] || fail "No deployment command supplied."
    command -v docker >/dev/null 2>&1 || fail "Docker CLI is required."
    stack_directory=$(pwd -P)
    
    [ -n "${HOSTNAME:-}" ] || fail "Run this script inside the Komodo Periphery container."
    image=$(docker_local container inspect --format '{{.Image}}' "$HOSTNAME") || fail "Cannot inspect Periphery through the local Docker socket."
    project=$(docker_local container inspect --format '{{index .Config.Labels "com.docker.compose.project"}}' "$HOSTNAME")
    service=$(docker_local container inspect --format '{{index .Config.Labels "com.docker.compose.service"}}' "$HOSTNAME")
    [ "$service" = periphery ] || fail "The calling container must be the Compose periphery service."
    [ -n "$image" ] || fail "The calling container has no image ID."
    
    helper_name="${project}-redeploy"
    helper_id=$(docker_local container ls --all --filter "name=^/${helper_name}$" --format '{{.ID}}')
    if [ -n "$helper_id" ]; then
        owner=$(docker_local container inspect --format '{{index .Config.Labels "komodo.self-redeploy"}}' "$helper_id")
        [ "$owner" = true ] || fail "Container $helper_name already exists and does not belong to this script."
        state=$(docker_local container inspect --format '{{.State.Status}}' "$helper_id")
        case "$state" in
            exited|dead) docker_local container rm "$helper_id" >/dev/null ;;
            *) fail "Helper $helper_name is $state; another redeploy may already be in progress." ;;
        esac
    fi
    
    # A separate container survives Periphery being recreated. Omit Compose labels so --remove-orphans cannot remove it, and retain it for logs and exit status.
    helper_id=$(docker_local run --detach --name "$helper_name" --label komodo.self-redeploy=true --label komodo.skip=true --restart no --pull never --entrypoint /bin/sh --mount "type=bind,src=$stack_directory,dst=$stack_directory,readonly" --mount type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock --workdir "$stack_directory" "$image" -c 'sleep 5; exec "$@"' komodo-redeploy "$@") || fail "Failed to launch the redeploy helper."
    
    printf '%s\n' "Redeploy scheduled in $helper_name ($helper_id). The helper starts Compose in five seconds." "Check completion with: docker logs $helper_name" "Check exit status with: docker inspect --format '{{.State.Status}} {{.State.ExitCode}}' $helper_name"
    
  4. bsmithuk commented on Oct 25, 2026

    @bsmithuk

    I've currently set up an ansible script to handle this but would be great if this was possible in the gui.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions