Switch from secrets to --ssh
This commit is contained in:
parent
7be08f459e
commit
285a6c1636
@ -100,8 +100,7 @@ RUN apt-get update \
|
|||||||
USER frappe
|
USER frappe
|
||||||
|
|
||||||
RUN mkdir -p /home/frappe/.ssh
|
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 echo -e "Host *\n\tStrictHostKeyChecking no\n" >> /home/frappe/.ssh/config
|
||||||
RUN git config --global core.sshCommand 'ssh -i /run/secrets/user_ssh_key'
|
|
||||||
|
|
||||||
ARG FRAPPE_BRANCH=version-15
|
ARG FRAPPE_BRANCH=version-15
|
||||||
ARG FRAPPE_PATH=https://github.com/frappe/frappe
|
ARG FRAPPE_PATH=https://github.com/frappe/frappe
|
||||||
@ -117,7 +116,7 @@ RUN bench init \
|
|||||||
--verbose \
|
--verbose \
|
||||||
/home/frappe/frappe-bench && \
|
/home/frappe/frappe-bench && \
|
||||||
cd /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 && \
|
echo "{}" > sites/common_site_config.json && \
|
||||||
find apps -mindepth 1 -path "*/.git" | xargs rm -fr
|
find apps -mindepth 1 -path "*/.git" | xargs rm -fr
|
||||||
|
|
||||||
|
@ -40,8 +40,6 @@ services:
|
|||||||
REDIS_QUEUE: ${REDIS_QUEUE}
|
REDIS_QUEUE: ${REDIS_QUEUE}
|
||||||
SOCKETIO_PORT: 9000
|
SOCKETIO_PORT: 9000
|
||||||
depends_on: {}
|
depends_on: {}
|
||||||
secrets:
|
|
||||||
- user_ssh_key
|
|
||||||
|
|
||||||
backend:
|
backend:
|
||||||
<<: *backend_defaults
|
<<: *backend_defaults
|
||||||
@ -88,7 +86,3 @@ services:
|
|||||||
# ERPNext requires local assets access (Frappe does not)
|
# ERPNext requires local assets access (Frappe does not)
|
||||||
volumes:
|
volumes:
|
||||||
sites:
|
sites:
|
||||||
|
|
||||||
secrets:
|
|
||||||
user_ssh_key:
|
|
||||||
file: ~/.ssh/brothertonerpprod_ed25519
|
|
||||||
|
@ -159,6 +159,8 @@ def setup_prod(
|
|||||||
[
|
[
|
||||||
which("docker"),
|
which("docker"),
|
||||||
"compose",
|
"compose",
|
||||||
|
"--ssh",
|
||||||
|
"default=$HOME/.ssh/brothertonerpprod_ed25519",
|
||||||
"--project-name",
|
"--project-name",
|
||||||
project,
|
project,
|
||||||
"-f",
|
"-f",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user