From 285a6c1636834b134d2ca61d733f16c2a47d81fb Mon Sep 17 00:00:00 2001 From: PAlexanderFranklin Date: Thu, 21 Mar 2024 13:37:23 -0700 Subject: [PATCH] Switch from secrets to --ssh --- Shilohimage | 5 ++--- compose.yaml | 6 ------ easy-installer.py | 2 ++ 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/Shilohimage b/Shilohimage index c7bac883..e21b3b0b 100644 --- a/Shilohimage +++ b/Shilohimage @@ -100,8 +100,7 @@ RUN apt-get update \ USER frappe RUN mkdir -p /home/frappe/.ssh -RUN echo -e "Host *\n\tStrictHostKeyChecking no\n\tIdentityFile /run/secrets/user_ssh_key\n" >> /home/frappe/.ssh/config -RUN git config --global core.sshCommand 'ssh -i /run/secrets/user_ssh_key' +RUN echo -e "Host *\n\tStrictHostKeyChecking no\n" >> /home/frappe/.ssh/config ARG FRAPPE_BRANCH=version-15 ARG FRAPPE_PATH=https://github.com/frappe/frappe @@ -117,7 +116,7 @@ RUN bench init \ --verbose \ /home/frappe/frappe-bench && \ cd /home/frappe/frappe-bench && \ - bench get-app --branch=${ERPNEXT_BRANCH} --resolve-deps erpnext ssh://${ERPNEXT_REPO} && \ + --mount=type=ssh bench get-app --branch=${ERPNEXT_BRANCH} --resolve-deps erpnext ssh://${ERPNEXT_REPO} && \ echo "{}" > sites/common_site_config.json && \ find apps -mindepth 1 -path "*/.git" | xargs rm -fr diff --git a/compose.yaml b/compose.yaml index ea078f00..f4d355a3 100644 --- a/compose.yaml +++ b/compose.yaml @@ -40,8 +40,6 @@ services: REDIS_QUEUE: ${REDIS_QUEUE} SOCKETIO_PORT: 9000 depends_on: {} - secrets: - - user_ssh_key backend: <<: *backend_defaults @@ -88,7 +86,3 @@ services: # ERPNext requires local assets access (Frappe does not) volumes: sites: - -secrets: - user_ssh_key: - file: ~/.ssh/brothertonerpprod_ed25519 diff --git a/easy-installer.py b/easy-installer.py index f8d2898b..4e0a66fb 100644 --- a/easy-installer.py +++ b/easy-installer.py @@ -159,6 +159,8 @@ def setup_prod( [ which("docker"), "compose", + "--ssh", + "default=$HOME/.ssh/brothertonerpprod_ed25519", "--project-name", project, "-f",