feat(IaC-Docker-Compose) change workaround because anchors are not usable from include
This commit is contained in:
parent
e70980a2fb
commit
757dbde199
@ -34,6 +34,16 @@ echo COMPOSE_PROJECT_NAME=project-prefix >>.env
|
||||
echo SOME_PASSWORD="$SOME_PASSWORD" >>.env
|
||||
----
|
||||
|
||||
== SSH Problem workaround
|
||||
|
||||
Sometimes there is a problem with some SSH servers and Docker.
|
||||
We have a workaround for this, please override your script with the following:
|
||||
|
||||
----
|
||||
script:
|
||||
- !reference [.broken-ssh-connection-workaround, script]
|
||||
----
|
||||
|
||||
.Variables
|
||||
|===
|
||||
|
||||
|
||||
@ -31,12 +31,13 @@
|
||||
- if [[ -n "$SCP_SOURCE" && -n "$SCP_DESTINATION" ]]; then scp -rp $SCP_SOURCE $SSH_USER@$SSH_URL:$SCP_DESTINATION; fi
|
||||
- DOCKER_HOST=ssh://$SSH_USER@$SSH_URL:$SSH_PORT docker-compose $COMPOSE_EXTRA_ARGS up -d --remove-orphans
|
||||
|
||||
.broken-ssh-connection-workaround: &broken-ssh-connection-workaround
|
||||
- if [[ -n "$SCP_SOURCE" && -n "$SCP_DESTINATION" ]]; then scp -rp $SCP_SOURCE $SSH_USER@$SSH_URL:$SCP_DESTINATION; fi
|
||||
# Tunnel Docker socket from remote Maschine to local Maschine. This should be more stable than the current SSH Implementation of Docker
|
||||
- rm -f /tmp/docker.sock
|
||||
- ssh -M -S docker-ctrl-socket -fnNT -L /tmp/docker.sock:/var/run/docker.sock "$SSH_USER@$SSH_URL" -p $SSH_PORT -o ControlPersist=no
|
||||
- DOCKER_HOST=unix:///tmp/docker.sock docker-compose $COMPOSE_EXTRA_ARGS up -d --remove-orphans
|
||||
.broken-ssh-connection-workaround:
|
||||
script:
|
||||
- if [[ -n "$SCP_SOURCE" && -n "$SCP_DESTINATION" ]]; then scp -rp $SCP_SOURCE $SSH_USER@$SSH_URL:$SCP_DESTINATION; fi
|
||||
# Tunnel Docker socket from remote Maschine to local Maschine. This should be more stable than the current SSH Implementation of Docker
|
||||
- rm -f /tmp/docker.sock
|
||||
- ssh -M -S docker-ctrl-socket -fnNT -L /tmp/docker.sock:/var/run/docker.sock "$SSH_USER@$SSH_URL" -p $SSH_PORT -o ControlPersist=no
|
||||
- DOCKER_HOST=unix:///tmp/docker.sock docker-compose $COMPOSE_EXTRA_ARGS up -d --remove-orphans
|
||||
|
||||
|
||||
.docker-compose-validate:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user