From 263c8fe8f20981ac1d4d9df0dcf7a1c32b0d640e Mon Sep 17 00:00:00 2001 From: sumita Date: Mon, 1 May 2023 15:13:18 +0530 Subject: [PATCH] Seperate blogs url for dev and live --- .github/workflows/deploy-dev.yml | 1 + .github/workflows/deploy-prod.yml | 1 + nginx/conf.d/default.conf | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-dev.yml b/.github/workflows/deploy-dev.yml index 608dce66f..0cca70f38 100644 --- a/.github/workflows/deploy-dev.yml +++ b/.github/workflows/deploy-dev.yml @@ -30,6 +30,7 @@ jobs: cd nginx sed -i "s|WEBSITE_URL|dev-stack.canopas.com|g" conf.d/default.conf sed -i "s|API_URL|dev-stack-api.canopas.com|g" conf.d/default.conf + sed -i "s|ARTICLES_URL|main.dzkjozipsd9ra.amplifyapp.com|g" conf.d/default.conf bash ./../deploy/deploy-ecr-image.sh dev-nginx ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.$AWS_REGION.amazonaws.com/canopas-website-nginx - name: Build frontend and push on ECR diff --git a/.github/workflows/deploy-prod.yml b/.github/workflows/deploy-prod.yml index 48dabb2ee..31ea86ce5 100644 --- a/.github/workflows/deploy-prod.yml +++ b/.github/workflows/deploy-prod.yml @@ -30,6 +30,7 @@ jobs: sed -i.bak -e '10,15d' conf.d/default.conf && rm conf.d/default.conf.bak sed -i "s|WEBSITE_URL|canopas.com|g" conf.d/default.conf sed -i "s|API_URL|prod-stack-api.canopas.com|g" conf.d/default.conf + sed -i "s|ARTICLES_URL|articles.canopas.com|g" conf.d/default.conf bash ./../deploy/deploy-ecr-image.sh prod-nginx ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.$AWS_REGION.amazonaws.com/canopas-website-nginx - name: Build frontend and push on ECR diff --git a/nginx/conf.d/default.conf b/nginx/conf.d/default.conf index d268ea90a..b09829cd2 100644 --- a/nginx/conf.d/default.conf +++ b/nginx/conf.d/default.conf @@ -10,8 +10,8 @@ server { location /resources { proxy_ssl_server_name on; - proxy_pass https://articles.canopas.com; - proxy_set_header Host articles.canopas.com; + proxy_pass https://ARTICLES_URL; + proxy_set_header Host ARTICLES_URL; } }