From b5060ddb8b8b43b33b665d2412d53430dbdc7d31 Mon Sep 17 00:00:00 2001 From: Mikan <72257910+Mikan-DS@users.noreply.github.com> Date: Wed, 7 Oct 2026 18:53:14 +0400 Subject: [PATCH] build better ssh --- compose.yaml | 52 +++++++++++++++++++++++++++++++++++++++++++---- ssh/entrypoint.sh | 4 +++- 2 files changed, 51 insertions(+), 5 deletions(-) diff --git a/compose.yaml b/compose.yaml index 2b95ee0..2756a53 100644 --- a/compose.yaml +++ b/compose.yaml @@ -29,7 +29,7 @@ services: hostname: ssh-operator volumes: - - ./ssh/authorized_keys:/mounted-authorized-keys:ro + - ${SSH_KEYS_HOST:-./ssh/authorized_keys}:/mounted-authorized-keys:ro - /var/run/docker.sock:/var/run/docker.sock - ./:/project @@ -38,6 +38,53 @@ services: restart: always + ssh-companion: + build: + context: ./ssh + + container_name: gpu-node-ssh-companion + hostname: ssh-operator-companion + + environment: + SSH_PORT: "2222" + + volumes: + - ${SSH_KEYS_HOST:-./ssh/authorized_keys}:/mounted-authorized-keys:ro + - /var/run/docker.sock:/var/run/docker.sock + - ./:/project + + networks: + - gpu-node + + restart: always + + + webdav: + image: rclone/rclone:latest + + container_name: gpu-node-webdav + hostname: webdav + + command: + - serve + - webdav + - /data + - --addr + - :8080 + - --user + - ${WEBDAV_USER:-operator} + - --pass + - ${WEBDAV_PASS} + + volumes: + - ${HOST_PROJECT_DIR:-./}:/data + + networks: + - gpu-node + + restart: always + + gpu-test: profiles: - test @@ -90,9 +137,6 @@ services: gpus: all - ports: - - "8188:8188" - volumes: - ./comfyui/run:/comfy/mnt - ./gpu/comfy:/basedir diff --git a/ssh/entrypoint.sh b/ssh/entrypoint.sh index 67b7306..d6b2bfd 100644 --- a/ssh/entrypoint.sh +++ b/ssh/entrypoint.sh @@ -7,4 +7,6 @@ chown -R operator:operator /home/operator/.ssh chmod 700 /home/operator/.ssh chmod 600 /home/operator/.ssh/authorized_keys -exec /usr/sbin/sshd -D -e \ No newline at end of file +SSH_PORT="${SSH_PORT:-22}" + +exec /usr/sbin/sshd -D -e -p "$SSH_PORT" \ No newline at end of file