Switch from secrets to --ssh

This commit is contained in:
PAlexanderFranklin 2024-03-21 13:37:23 -07:00
parent 7be08f459e
commit 285a6c1636
3 changed files with 4 additions and 9 deletions

View File

@ -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

View File

@ -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

View File

@ -159,6 +159,8 @@ def setup_prod(
[
which("docker"),
"compose",
"--ssh",
"default=$HOME/.ssh/brothertonerpprod_ed25519",
"--project-name",
project,
"-f",