Hello,
I am new to gitlab CI/CD and I am trying to deploy my shiny application on my own server.
I use an aws ec2 Ubuntu 20.04.4 machine on which I installed srtudio-server and shiny-server (accessible via their url).
In gitlab-ci.yml I have:
deploy:
image: alpine:latest
stage: deploy
when: manual
only:
- master
environment:
name: production
url: http://12.##.##.##
before_script:
- apt-get update && apt-get install -y sshpass openssh-client
- export SSHPASS=$DEPLOY_PWD
script:
- chmod og= $ID_RSA #sshpass -e ssh -o StrictHostKeyChecking=no $DEPLOY_USER@$DEPLOY_IP
- apk update && apk add openssh-client #"docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY_IMAGE;
- ssh -i $ID_RSA -o StrictHostKeyChecking=no $DEPLOY_USER@$DEPLOY_IP "docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY" #docker pull $CI_REGISTRY_IMAGE:latest;
- ssh -i $ID_RSA -o StrictHostKeyChecking=no $DEPLOY_USER@$DEPLOY_IP "docker pull $TAG_COMMIT" #docker logout $CI_REGISTRY_IMAGE;"
- ssh -i $ID_RSA -o StrictHostKeyChecking=no $DEPLOY_USER@$DEPLOY_IP "docker container rm -f my-app || true"
- ssh -i $ID_RSA -o StrictHostKeyChecking=no $DEPLOY_USER@$DEPLOY_IP "docker run -d -p 90:80 --name my-app $TAG_COMMIT"
And I got this error :
I need your help please