From 984dc988b4757ef7c152ac5af7846c8d7bb77afb Mon Sep 17 00:00:00 2001 From: quytranDF Date: Sun, 8 Sep 2024 15:32:26 +0700 Subject: [PATCH] debug --- .circleci/config.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 647ab44..c24f098 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -67,17 +67,18 @@ jobs: name: SSH into dev server and deploy command: | echo "SSH into dev server" - ssh -o StrictHostKeyChecking=no -v $SSH_USER@$SSH_HOST << 'EOF' + ssh -o StrictHostKeyChecking=no -v $SSH_USER@$SSH_HOST " su - gdsc -c ' cd map-sorter-api && - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin && + 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 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 ' - EOF + " workflows: version: 3 @@ -99,11 +100,11 @@ workflows: - equal: [deploy, << pipeline.parameters.task >>] - equal: [dev, << pipeline.parameters.build_stage >>] jobs: - - build + # - build - deploy: context: aws - requires: - - build + # requires: + # - build filters: branches: only: test