From 99c006747ac3545b04770f4e02b316028fc5b445 Mon Sep 17 00:00:00 2001 From: Justin Oros Date: Sat, 18 Apr 2026 13:39:30 -0700 Subject: [PATCH] fix compose.yaml key volume sed pattern; clean up compose.yaml --- spoke/compose.yaml | 2 -- spoke/setup-spoke.sh | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/spoke/compose.yaml b/spoke/compose.yaml index b5b7e07..002b123 100644 --- a/spoke/compose.yaml +++ b/spoke/compose.yaml @@ -7,7 +7,6 @@ services: network_mode: host environment: - AUTOSSH_GATETIME=0 - # @@@@@@@@@ BEWARE THE REVERSE TUNNEL PORT AND KEYS WHEN RUNNING THIS ON A NEW SPOKE @@@@@@@@@@ command: > autossh -M 0 -NT -o "ServerAliveInterval=60" @@ -18,7 +17,6 @@ services: volumes: - /home/armbian/.ssh/oilykey2026:/home/armbian/.ssh/oilykey2026:ro - /home/armbian/.ssh/known_hosts:/home/armbian/.ssh/known_hosts:ro - # - /home/armbian/share:/home/armbian/ syncthing: image: syncthing/syncthing container_name: spoke-syncthing diff --git a/spoke/setup-spoke.sh b/spoke/setup-spoke.sh index b21c845..586204a 100755 --- a/spoke/setup-spoke.sh +++ b/spoke/setup-spoke.sh @@ -310,7 +310,7 @@ info "Setting port to $TUNNEL_PORT and key to $KEY_NAME..." sed -i "s|-R [0-9]*:localhost:22|-R ${TUNNEL_PORT}:localhost:22|g" "$COMPOSE" sed -i "s|-i /home/[^ ]*/\.ssh/[^ ]*|-i ${SSH_DIR}/${KEY_NAME}|g" "$COMPOSE" -sed -i "s|/home/[^/]*/\.ssh/[^:]*:${SSH_DIR}/[^:]*|${SSH_DIR}/${KEY_NAME}:${SSH_DIR}/${KEY_NAME}|g" "$COMPOSE" +sed -i "s|/home/[^/]*/\.ssh/[^:]*:/home/[^/]*/\.ssh/[^:]*:ro|${SSH_DIR}/${KEY_NAME}:${SSH_DIR}/${KEY_NAME}:ro|g" "$COMPOSE" sed -i "s|/home/[^/]*/\.ssh/known_hosts|${SSH_DIR}/known_hosts|g" "$COMPOSE" sed -i "s|container_name: spoke-autossh|container_name: ${SPOKE_NAME}-autossh|g" "$COMPOSE" sed -i "s|container_name: spoke-syncthing|container_name: ${SPOKE_NAME}-syncthing|g" "$COMPOSE"