From f97c60b8c46ac1a213c4ee17b262c8285393d4fa Mon Sep 17 00:00:00 2001 From: cp-sumi-k Date: Wed, 23 Oct 2024 14:16:03 +0530 Subject: [PATCH] Remove certs --- .github/workflows/admin.yml | 1 - admin/deploy.sh | 2 -- admin/docker-compose.yaml | 1 - 3 files changed, 4 deletions(-) diff --git a/.github/workflows/admin.yml b/.github/workflows/admin.yml index 8221780..de813a7 100644 --- a/.github/workflows/admin.yml +++ b/.github/workflows/admin.yml @@ -49,7 +49,6 @@ jobs: run: | echo "$SSH_PRIVATE_KEY" > ssh_private_key && chmod 600 ssh_private_key sed -i "s|ADMIN_PANEL_URL|${{ secrets.ADMIN_PANEL_URL }}|g" admin/nginx/conf.d/website-blog.conf - echo -e "$SSL_PRIVATE_KEY" > admin/nginx/certs/blog.live.domain.name.key && echo -e "$SSL_PUBLIC_KEY" > admin/nginx/certs/blog.live.domain.name.cert scp -o StrictHostKeyChecking=no -i ssh_private_key -r admin/nginx ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_ADDRESS }}:blog-admin-deployment cat admin/deploy.sh | ssh -o StrictHostKeyChecking=no -i ssh_private_key ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_ADDRESS }} 'cat > ./blog-admin-deployment/deploy.sh' cat admin/docker-compose.yaml | ssh -o StrictHostKeyChecking=no -i ssh_private_key ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_ADDRESS }} sudo PUBLISH_PORT=${{secrets.PUBLISH_PORT}} APP_KEYS=${{secrets.APP_KEYS}} API_TOKEN_SALT=${{secrets.API_TOKEN_SALT}} ADMIN_JWT_SECRET=${{secrets.ADMIN_JWT_SECRET}} JWT_SECRET=${{secrets.JWT_SECRET}} DATABASE_CLIENT=${{secrets.DATABASE_CLIENT}} DATABASE_HOST=${{secrets.DATABASE_HOST}} DATABASE_PORT=${{secrets.DATABASE_PORT}} DATABASE_NAME=${{secrets.DATABASE_NAME}} DATABASE_USERNAME=${{secrets.DATABASE_USERNAME}} DATABASE_PASSWORD=${{secrets.DATABASE_PASSWORD}} DATABASE_SSL=${{secrets.DATABASE_SSL}} AWS_ACCOUNT_ID=${{secrets.AWS_ACCOUNT_ID}} AWS_ACCESS_KEY_ID=${{secrets.AWS_ACCESS_KEY_ID}} AWS_SECRET_ACCESS_KEY=${{secrets.AWS_SECRET_ACCESS_KEY}} AWS_REGION=${{secrets.AWS_REGION}} AWS_BUCKET=${{secrets.AWS_BUCKET}} AWS_BUCKET_URL=${{secrets.AWS_BUCKET_URL}} GITHUB_SHA=${{github.sha}} GITHUB_RUN_ATTEMPT=${{github.run_attempt}} HR_FROM_MAIL=${{secrets.HR_FROM_MAIL}} 'bash -c "cd blog-admin-deployment && cat > docker-compose.yaml && chmod -R 755 ./deploy.sh && ./deploy.sh && cd .. && rm -rf blog-admin-deployment"' diff --git a/admin/deploy.sh b/admin/deploy.sh index 5c4fb4f..6d9e6ec 100644 --- a/admin/deploy.sh +++ b/admin/deploy.sh @@ -4,8 +4,6 @@ aws ecr get-login-password --region $AWS_REGION | docker login --username AWS -- sudo mkdir -p /etc/nginx/conf.d && sudo mv nginx.conf /etc/nginx/ && sudo mv conf.d/website-blog.conf /etc/nginx/conf.d/ -sudo mkdir -p /etc/nginx/certs && sudo mv certs/blog.live.domain.name.key /etc/nginx/certs/blog.live.domain.name.key && sudo mv certs/blog.live.domain.name.cert /etc/nginx/certs/blog.live.domain.name.cert - docker stack deploy --with-registry-auth -c ./docker-compose.yaml canopas-website docker system prune --force \ No newline at end of file diff --git a/admin/docker-compose.yaml b/admin/docker-compose.yaml index 6dfc305..a4ffce2 100644 --- a/admin/docker-compose.yaml +++ b/admin/docker-compose.yaml @@ -35,7 +35,6 @@ services: deploy: replicas: 1 volumes: - - /etc/nginx/certs/:/etc/nginx/certs/ - /etc/nginx/conf.d/:/etc/nginx/conf.d/ - /etc/nginx/nginx.conf:/etc/nginx/nginx.conf networks: