From 0f083d3d6ee7259eeefb18fe7184ee0d33e21e33 Mon Sep 17 00:00:00 2001 From: quytranDF Date: Sun, 8 Sep 2024 14:26:16 +0700 Subject: [PATCH] debug --- .circleci/config.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3afa6e9..603ebe2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -64,23 +64,23 @@ jobs: name: SSH into dev server and deploy command: | echo "SSH into dev server" - ssh -o BatchMode=yes -o StrictHostKeyChecking=no -v $SSH_USER@$SSH_HOST + ssh -o StrictHostKeyChecking=no -v $SSH_USER@$SSH_HOST "su - gdsc -c 'echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin && docker pull $DOCKER_IMAGE:$DOCKER_TAG && docker container stop map-sorter-api || true && docker container rm map-sorter-api || true && docker run --log-opt max-size=10m --log-opt max-file=3 --log-opt compress=true --name map-sorter-api -d --env-file .env $DOCKER_IMAGE:$DOCKER_TAG && docker image prune --all -f'" - - run: - name: Login to DockerHub - command: | - su - gdsc - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin + # - run: + # name: Login to DockerHub + # command: | + # su - gdsc + # echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin - - run: - name: 'Deploy to << pipeline.parameters.build_stage >> environment' - command: | - echo "Deploying to << pipeline.parameters.build_stage >>" - docker pull $DOCKER_IMAGE:$DOCKER_TAG - docker container stop map-sorter-api || true - docker container rm map-sorter-api || true - docker run --log-opt max-size=10m --log-opt max-file=3 --log-opt compress=true --name map-sorter-api -d --env-file .env $DOCKER_IMAGE:$DOCKER_TAG - docker image prune --all -f + # - run: + # name: 'Deploy to << pipeline.parameters.build_stage >> environment' + # command: | + # echo "Deploying to << pipeline.parameters.build_stage >>" + # docker pull $DOCKER_IMAGE:$DOCKER_TAG + # docker container stop map-sorter-api || true + # docker container rm map-sorter-api || true + # docker run --log-opt max-size=10m --log-opt max-file=3 --log-opt compress=true --name map-sorter-api -d --env-file .env $DOCKER_IMAGE:$DOCKER_TAG + # docker image prune --all -f workflows: version: 3